mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-5319f1ba23b5304e/out/
common.rs

1#![doc = "MAVLink common dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25pub const DIALECT_NUMBER: u8 = 0u8;
26#[cfg_attr(feature = "ts", derive(TS))]
27#[cfg_attr(feature = "ts", ts(export))]
28#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "serde", serde(tag = "type"))]
31#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32#[repr(u32)]
33#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
34pub enum ActuatorConfiguration {
35    #[doc = "Do nothing."]
36    ACTUATOR_CONFIGURATION_NONE = 0,
37    #[doc = "Command the actuator to beep now."]
38    ACTUATOR_CONFIGURATION_BEEP = 1,
39    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
41    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
42    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
45    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
46    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
47}
48impl ActuatorConfiguration {
49    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
50}
51impl Default for ActuatorConfiguration {
52    fn default() -> Self {
53        Self::DEFAULT
54    }
55}
56#[cfg_attr(feature = "ts", derive(TS))]
57#[cfg_attr(feature = "ts", ts(export))]
58#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
59#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
60#[cfg_attr(feature = "serde", serde(tag = "type"))]
61#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
62#[repr(u32)]
63#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
64pub enum ActuatorOutputFunction {
65    #[doc = "No function (disabled)."]
66    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
67    #[doc = "Motor 1"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
69    #[doc = "Motor 2"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
71    #[doc = "Motor 3"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
73    #[doc = "Motor 4"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
75    #[doc = "Motor 5"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
77    #[doc = "Motor 6"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
79    #[doc = "Motor 7"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
81    #[doc = "Motor 8"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
83    #[doc = "Motor 9"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
85    #[doc = "Motor 10"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
87    #[doc = "Motor 11"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
89    #[doc = "Motor 12"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
91    #[doc = "Motor 13"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
93    #[doc = "Motor 14"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
95    #[doc = "Motor 15"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
97    #[doc = "Motor 16"]
98    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
99    #[doc = "Servo 1"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
101    #[doc = "Servo 2"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
103    #[doc = "Servo 3"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
105    #[doc = "Servo 4"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
107    #[doc = "Servo 5"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
109    #[doc = "Servo 6"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
111    #[doc = "Servo 7"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
113    #[doc = "Servo 8"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
115    #[doc = "Servo 9"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
117    #[doc = "Servo 10"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
119    #[doc = "Servo 11"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
121    #[doc = "Servo 12"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
123    #[doc = "Servo 13"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
125    #[doc = "Servo 14"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
127    #[doc = "Servo 15"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
129    #[doc = "Servo 16"]
130    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
131}
132impl ActuatorOutputFunction {
133    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
134}
135impl Default for ActuatorOutputFunction {
136    fn default() -> Self {
137        Self::DEFAULT
138    }
139}
140#[cfg_attr(feature = "ts", derive(TS))]
141#[cfg_attr(feature = "ts", ts(export))]
142#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
144#[cfg_attr(feature = "serde", serde(tag = "type"))]
145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
146#[repr(u32)]
147#[doc = "Enumeration of the ADSB altimeter types"]
148pub enum AdsbAltitudeType {
149    #[doc = "Altitude reported from a Baro source using QNH reference"]
150    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
151    #[doc = "Altitude reported from a GNSS source"]
152    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
153}
154impl AdsbAltitudeType {
155    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
156}
157impl Default for AdsbAltitudeType {
158    fn default() -> Self {
159        Self::DEFAULT
160    }
161}
162#[cfg_attr(feature = "ts", derive(TS))]
163#[cfg_attr(feature = "ts", ts(export))]
164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
166#[cfg_attr(feature = "serde", serde(tag = "type"))]
167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
168#[repr(u32)]
169#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
170pub enum AdsbEmitterType {
171    ADSB_EMITTER_TYPE_NO_INFO = 0,
172    ADSB_EMITTER_TYPE_LIGHT = 1,
173    ADSB_EMITTER_TYPE_SMALL = 2,
174    ADSB_EMITTER_TYPE_LARGE = 3,
175    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
176    ADSB_EMITTER_TYPE_HEAVY = 5,
177    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
178    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
179    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
180    ADSB_EMITTER_TYPE_GLIDER = 9,
181    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
182    ADSB_EMITTER_TYPE_PARACHUTE = 11,
183    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
184    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
185    ADSB_EMITTER_TYPE_UAV = 14,
186    ADSB_EMITTER_TYPE_SPACE = 15,
187    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
188    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
189    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
190    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
191}
192impl AdsbEmitterType {
193    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
194}
195impl Default for AdsbEmitterType {
196    fn default() -> Self {
197        Self::DEFAULT
198    }
199}
200bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
201impl AdsbFlags {
202    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
203}
204impl Default for AdsbFlags {
205    fn default() -> Self {
206        Self::DEFAULT
207    }
208}
209bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
210impl AisFlags {
211    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
212}
213impl Default for AisFlags {
214    fn default() -> Self {
215        Self::DEFAULT
216    }
217}
218#[cfg_attr(feature = "ts", derive(TS))]
219#[cfg_attr(feature = "ts", ts(export))]
220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
222#[cfg_attr(feature = "serde", serde(tag = "type"))]
223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
224#[repr(u32)]
225#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
226pub enum AisNavStatus {
227    #[doc = "Under way using engine."]
228    UNDER_WAY = 0,
229    AIS_NAV_ANCHORED = 1,
230    AIS_NAV_UN_COMMANDED = 2,
231    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
232    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
233    AIS_NAV_MOORED = 5,
234    AIS_NAV_AGROUND = 6,
235    AIS_NAV_FISHING = 7,
236    AIS_NAV_SAILING = 8,
237    AIS_NAV_RESERVED_HSC = 9,
238    AIS_NAV_RESERVED_WIG = 10,
239    AIS_NAV_RESERVED_1 = 11,
240    AIS_NAV_RESERVED_2 = 12,
241    AIS_NAV_RESERVED_3 = 13,
242    #[doc = "Search And Rescue Transponder."]
243    AIS_NAV_AIS_SART = 14,
244    #[doc = "Not available (default)."]
245    AIS_NAV_UNKNOWN = 15,
246}
247impl AisNavStatus {
248    pub const DEFAULT: Self = Self::UNDER_WAY;
249}
250impl Default for AisNavStatus {
251    fn default() -> Self {
252        Self::DEFAULT
253    }
254}
255#[cfg_attr(feature = "ts", derive(TS))]
256#[cfg_attr(feature = "ts", ts(export))]
257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
259#[cfg_attr(feature = "serde", serde(tag = "type"))]
260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
261#[repr(u32)]
262#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
263pub enum AisType {
264    #[doc = "Not available (default)."]
265    AIS_TYPE_UNKNOWN = 0,
266    AIS_TYPE_RESERVED_1 = 1,
267    AIS_TYPE_RESERVED_2 = 2,
268    AIS_TYPE_RESERVED_3 = 3,
269    AIS_TYPE_RESERVED_4 = 4,
270    AIS_TYPE_RESERVED_5 = 5,
271    AIS_TYPE_RESERVED_6 = 6,
272    AIS_TYPE_RESERVED_7 = 7,
273    AIS_TYPE_RESERVED_8 = 8,
274    AIS_TYPE_RESERVED_9 = 9,
275    AIS_TYPE_RESERVED_10 = 10,
276    AIS_TYPE_RESERVED_11 = 11,
277    AIS_TYPE_RESERVED_12 = 12,
278    AIS_TYPE_RESERVED_13 = 13,
279    AIS_TYPE_RESERVED_14 = 14,
280    AIS_TYPE_RESERVED_15 = 15,
281    AIS_TYPE_RESERVED_16 = 16,
282    AIS_TYPE_RESERVED_17 = 17,
283    AIS_TYPE_RESERVED_18 = 18,
284    AIS_TYPE_RESERVED_19 = 19,
285    #[doc = "Wing In Ground effect."]
286    AIS_TYPE_WIG = 20,
287    AIS_TYPE_WIG_HAZARDOUS_A = 21,
288    AIS_TYPE_WIG_HAZARDOUS_B = 22,
289    AIS_TYPE_WIG_HAZARDOUS_C = 23,
290    AIS_TYPE_WIG_HAZARDOUS_D = 24,
291    AIS_TYPE_WIG_RESERVED_1 = 25,
292    AIS_TYPE_WIG_RESERVED_2 = 26,
293    AIS_TYPE_WIG_RESERVED_3 = 27,
294    AIS_TYPE_WIG_RESERVED_4 = 28,
295    AIS_TYPE_WIG_RESERVED_5 = 29,
296    AIS_TYPE_FISHING = 30,
297    AIS_TYPE_TOWING = 31,
298    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
299    AIS_TYPE_TOWING_LARGE = 32,
300    #[doc = "Dredging or other underwater ops."]
301    AIS_TYPE_DREDGING = 33,
302    AIS_TYPE_DIVING = 34,
303    AIS_TYPE_MILITARY = 35,
304    AIS_TYPE_SAILING = 36,
305    AIS_TYPE_PLEASURE = 37,
306    AIS_TYPE_RESERVED_20 = 38,
307    AIS_TYPE_RESERVED_21 = 39,
308    #[doc = "High Speed Craft."]
309    AIS_TYPE_HSC = 40,
310    AIS_TYPE_HSC_HAZARDOUS_A = 41,
311    AIS_TYPE_HSC_HAZARDOUS_B = 42,
312    AIS_TYPE_HSC_HAZARDOUS_C = 43,
313    AIS_TYPE_HSC_HAZARDOUS_D = 44,
314    AIS_TYPE_HSC_RESERVED_1 = 45,
315    AIS_TYPE_HSC_RESERVED_2 = 46,
316    AIS_TYPE_HSC_RESERVED_3 = 47,
317    AIS_TYPE_HSC_RESERVED_4 = 48,
318    AIS_TYPE_HSC_UNKNOWN = 49,
319    AIS_TYPE_PILOT = 50,
320    #[doc = "Search And Rescue vessel."]
321    AIS_TYPE_SAR = 51,
322    AIS_TYPE_TUG = 52,
323    AIS_TYPE_PORT_TENDER = 53,
324    #[doc = "Anti-pollution equipment."]
325    AIS_TYPE_ANTI_POLLUTION = 54,
326    AIS_TYPE_LAW_ENFORCEMENT = 55,
327    AIS_TYPE_SPARE_LOCAL_1 = 56,
328    AIS_TYPE_SPARE_LOCAL_2 = 57,
329    AIS_TYPE_MEDICAL_TRANSPORT = 58,
330    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
331    AIS_TYPE_NONECOMBATANT = 59,
332    AIS_TYPE_PASSENGER = 60,
333    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
334    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
335    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
336    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
337    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
338    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
339    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
340    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
341    AIS_TYPE_PASSENGER_UNKNOWN = 69,
342    AIS_TYPE_CARGO = 70,
343    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
344    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
345    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
346    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
347    AIS_TYPE_CARGO_RESERVED_1 = 75,
348    AIS_TYPE_CARGO_RESERVED_2 = 76,
349    AIS_TYPE_CARGO_RESERVED_3 = 77,
350    AIS_TYPE_CARGO_RESERVED_4 = 78,
351    AIS_TYPE_CARGO_UNKNOWN = 79,
352    AIS_TYPE_TANKER = 80,
353    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
354    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
355    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
356    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
357    AIS_TYPE_TANKER_RESERVED_1 = 85,
358    AIS_TYPE_TANKER_RESERVED_2 = 86,
359    AIS_TYPE_TANKER_RESERVED_3 = 87,
360    AIS_TYPE_TANKER_RESERVED_4 = 88,
361    AIS_TYPE_TANKER_UNKNOWN = 89,
362    AIS_TYPE_OTHER = 90,
363    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
364    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
365    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
366    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
367    AIS_TYPE_OTHER_RESERVED_1 = 95,
368    AIS_TYPE_OTHER_RESERVED_2 = 96,
369    AIS_TYPE_OTHER_RESERVED_3 = 97,
370    AIS_TYPE_OTHER_RESERVED_4 = 98,
371    AIS_TYPE_OTHER_UNKNOWN = 99,
372}
373impl AisType {
374    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
375}
376impl Default for AisType {
377    fn default() -> Self {
378        Self::DEFAULT
379    }
380}
381bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
382impl AttitudeTargetTypemask {
383    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
384}
385impl Default for AttitudeTargetTypemask {
386    fn default() -> Self {
387        Self::DEFAULT
388    }
389}
390#[cfg_attr(feature = "ts", derive(TS))]
391#[cfg_attr(feature = "ts", ts(export))]
392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
394#[cfg_attr(feature = "serde", serde(tag = "type"))]
395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
396#[repr(u32)]
397#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
398pub enum AutotuneAxis {
399    #[doc = "Autotune roll axis."]
400    AUTOTUNE_AXIS_ROLL = 1,
401    #[doc = "Autotune pitch axis."]
402    AUTOTUNE_AXIS_PITCH = 2,
403    #[doc = "Autotune yaw axis."]
404    AUTOTUNE_AXIS_YAW = 4,
405}
406impl AutotuneAxis {
407    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
408}
409impl Default for AutotuneAxis {
410    fn default() -> Self {
411        Self::DEFAULT
412    }
413}
414bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
415impl CameraCapFlags {
416    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
417}
418impl Default for CameraCapFlags {
419    fn default() -> Self {
420        Self::DEFAULT
421    }
422}
423#[cfg_attr(feature = "ts", derive(TS))]
424#[cfg_attr(feature = "ts", ts(export))]
425#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
427#[cfg_attr(feature = "serde", serde(tag = "type"))]
428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
429#[repr(u32)]
430#[doc = "Camera Modes."]
431pub enum CameraMode {
432    #[doc = "Camera is in image/photo capture mode."]
433    CAMERA_MODE_IMAGE = 0,
434    #[doc = "Camera is in video capture mode."]
435    CAMERA_MODE_VIDEO = 1,
436    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
437    CAMERA_MODE_IMAGE_SURVEY = 2,
438}
439impl CameraMode {
440    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
441}
442impl Default for CameraMode {
443    fn default() -> Self {
444        Self::DEFAULT
445    }
446}
447#[cfg_attr(feature = "ts", derive(TS))]
448#[cfg_attr(feature = "ts", ts(export))]
449#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
451#[cfg_attr(feature = "serde", serde(tag = "type"))]
452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
453#[repr(u32)]
454#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
455pub enum CameraSource {
456    #[doc = "Default camera source."]
457    CAMERA_SOURCE_DEFAULT = 0,
458    #[doc = "RGB camera source."]
459    CAMERA_SOURCE_RGB = 1,
460    #[doc = "IR camera source."]
461    CAMERA_SOURCE_IR = 2,
462    #[doc = "NDVI camera source."]
463    CAMERA_SOURCE_NDVI = 3,
464}
465impl CameraSource {
466    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
467}
468impl Default for CameraSource {
469    fn default() -> Self {
470        Self::DEFAULT
471    }
472}
473#[cfg_attr(feature = "ts", derive(TS))]
474#[cfg_attr(feature = "ts", ts(export))]
475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
477#[cfg_attr(feature = "serde", serde(tag = "type"))]
478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
479#[repr(u32)]
480#[doc = "Camera tracking modes"]
481pub enum CameraTrackingMode {
482    #[doc = "Not tracking"]
483    CAMERA_TRACKING_MODE_NONE = 0,
484    #[doc = "Target is a point"]
485    CAMERA_TRACKING_MODE_POINT = 1,
486    #[doc = "Target is a rectangle"]
487    CAMERA_TRACKING_MODE_RECTANGLE = 2,
488}
489impl CameraTrackingMode {
490    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
491}
492impl Default for CameraTrackingMode {
493    fn default() -> Self {
494        Self::DEFAULT
495    }
496}
497#[cfg_attr(feature = "ts", derive(TS))]
498#[cfg_attr(feature = "ts", ts(export))]
499#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
501#[cfg_attr(feature = "serde", serde(tag = "type"))]
502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
503#[repr(u32)]
504#[doc = "Camera tracking status flags"]
505pub enum CameraTrackingStatusFlags {
506    #[doc = "Camera is not tracking"]
507    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
508    #[doc = "Camera is tracking"]
509    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
510    #[doc = "Camera tracking in error state"]
511    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
512}
513impl CameraTrackingStatusFlags {
514    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
515}
516impl Default for CameraTrackingStatusFlags {
517    fn default() -> Self {
518        Self::DEFAULT
519    }
520}
521bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
522impl CameraTrackingTargetData {
523    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
524}
525impl Default for CameraTrackingTargetData {
526    fn default() -> Self {
527        Self::DEFAULT
528    }
529}
530#[cfg_attr(feature = "ts", derive(TS))]
531#[cfg_attr(feature = "ts", ts(export))]
532#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
533#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
534#[cfg_attr(feature = "serde", serde(tag = "type"))]
535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
536#[repr(u32)]
537#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
538pub enum CameraZoomType {
539    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
540    ZOOM_TYPE_STEP = 0,
541    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
542    ZOOM_TYPE_CONTINUOUS = 1,
543    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
544    ZOOM_TYPE_RANGE = 2,
545    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
546    ZOOM_TYPE_FOCAL_LENGTH = 3,
547    #[doc = "Zoom value as horizontal field of view in degrees."]
548    ZOOM_TYPE_HORIZONTAL_FOV = 4,
549}
550impl CameraZoomType {
551    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
552}
553impl Default for CameraZoomType {
554    fn default() -> Self {
555        Self::DEFAULT
556    }
557}
558#[cfg_attr(feature = "ts", derive(TS))]
559#[cfg_attr(feature = "ts", ts(export))]
560#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
562#[cfg_attr(feature = "serde", serde(tag = "type"))]
563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
564#[repr(u32)]
565pub enum CanFilterOp {
566    CAN_FILTER_REPLACE = 0,
567    CAN_FILTER_ADD = 1,
568    CAN_FILTER_REMOVE = 2,
569}
570impl CanFilterOp {
571    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
572}
573impl Default for CanFilterOp {
574    fn default() -> Self {
575        Self::DEFAULT
576    }
577}
578#[cfg_attr(feature = "ts", derive(TS))]
579#[cfg_attr(feature = "ts", ts(export))]
580#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
582#[cfg_attr(feature = "serde", serde(tag = "type"))]
583#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
584#[repr(u32)]
585#[doc = "Possible responses from a CELLULAR_CONFIG message."]
586pub enum CellularConfigResponse {
587    #[doc = "Changes accepted."]
588    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
589    #[doc = "Invalid APN."]
590    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
591    #[doc = "Invalid PIN."]
592    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
593    #[doc = "Changes rejected."]
594    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
595    #[doc = "PUK is required to unblock SIM card."]
596    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
597}
598impl CellularConfigResponse {
599    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
600}
601impl Default for CellularConfigResponse {
602    fn default() -> Self {
603        Self::DEFAULT
604    }
605}
606#[cfg_attr(feature = "ts", derive(TS))]
607#[cfg_attr(feature = "ts", ts(export))]
608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
610#[cfg_attr(feature = "serde", serde(tag = "type"))]
611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
612#[repr(u32)]
613#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
614pub enum CellularNetworkFailedReason {
615    #[doc = "No error"]
616    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
617    #[doc = "Error state is unknown"]
618    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
619    #[doc = "SIM is required for the modem but missing"]
620    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
621    #[doc = "SIM is available, but not usable for connection"]
622    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
623}
624impl CellularNetworkFailedReason {
625    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
626}
627impl Default for CellularNetworkFailedReason {
628    fn default() -> Self {
629        Self::DEFAULT
630    }
631}
632#[cfg_attr(feature = "ts", derive(TS))]
633#[cfg_attr(feature = "ts", ts(export))]
634#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
636#[cfg_attr(feature = "serde", serde(tag = "type"))]
637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
638#[repr(u32)]
639#[doc = "Cellular network radio type"]
640pub enum CellularNetworkRadioType {
641    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
642    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
643    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
644    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
645    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
646}
647impl CellularNetworkRadioType {
648    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
649}
650impl Default for CellularNetworkRadioType {
651    fn default() -> Self {
652        Self::DEFAULT
653    }
654}
655#[cfg_attr(feature = "ts", derive(TS))]
656#[cfg_attr(feature = "ts", ts(export))]
657#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
659#[cfg_attr(feature = "serde", serde(tag = "type"))]
660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
661#[repr(u32)]
662#[doc = "These flags encode the cellular network status"]
663pub enum CellularStatusFlag {
664    #[doc = "State unknown or not reportable."]
665    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
666    #[doc = "Modem is unusable"]
667    CELLULAR_STATUS_FLAG_FAILED = 1,
668    #[doc = "Modem is being initialized"]
669    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
670    #[doc = "Modem is locked"]
671    CELLULAR_STATUS_FLAG_LOCKED = 3,
672    #[doc = "Modem is not enabled and is powered down"]
673    CELLULAR_STATUS_FLAG_DISABLED = 4,
674    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
675    CELLULAR_STATUS_FLAG_DISABLING = 5,
676    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
677    CELLULAR_STATUS_FLAG_ENABLING = 6,
678    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
679    CELLULAR_STATUS_FLAG_ENABLED = 7,
680    #[doc = "Modem is searching for a network provider to register"]
681    CELLULAR_STATUS_FLAG_SEARCHING = 8,
682    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
683    CELLULAR_STATUS_FLAG_REGISTERED = 9,
684    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
685    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
686    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
687    CELLULAR_STATUS_FLAG_CONNECTING = 11,
688    #[doc = "One or more packet data bearers is active and connected"]
689    CELLULAR_STATUS_FLAG_CONNECTED = 12,
690}
691impl CellularStatusFlag {
692    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
693}
694impl Default for CellularStatusFlag {
695    fn default() -> Self {
696        Self::DEFAULT
697    }
698}
699#[cfg_attr(feature = "ts", derive(TS))]
700#[cfg_attr(feature = "ts", ts(export))]
701#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
703#[cfg_attr(feature = "serde", serde(tag = "type"))]
704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
705#[repr(u32)]
706#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
707pub enum CompMetadataType {
708    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
709    COMP_METADATA_TYPE_GENERAL = 0,
710    #[doc = "Parameter meta data."]
711    COMP_METADATA_TYPE_PARAMETER = 1,
712    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
713    COMP_METADATA_TYPE_COMMANDS = 2,
714    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
715    COMP_METADATA_TYPE_PERIPHERALS = 3,
716    #[doc = "Meta data for the events interface."]
717    COMP_METADATA_TYPE_EVENTS = 4,
718    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
719    COMP_METADATA_TYPE_ACTUATORS = 5,
720}
721impl CompMetadataType {
722    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
723}
724impl Default for CompMetadataType {
725    fn default() -> Self {
726        Self::DEFAULT
727    }
728}
729#[cfg_attr(feature = "ts", derive(TS))]
730#[cfg_attr(feature = "ts", ts(export))]
731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
733#[cfg_attr(feature = "serde", serde(tag = "type"))]
734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
735#[repr(u32)]
736#[doc = "Indicates the ESC connection type."]
737pub enum EscConnectionType {
738    #[doc = "Traditional PPM ESC."]
739    ESC_CONNECTION_TYPE_PPM = 0,
740    #[doc = "Serial Bus connected ESC."]
741    ESC_CONNECTION_TYPE_SERIAL = 1,
742    #[doc = "One Shot PPM ESC."]
743    ESC_CONNECTION_TYPE_ONESHOT = 2,
744    #[doc = "I2C ESC."]
745    ESC_CONNECTION_TYPE_I2C = 3,
746    #[doc = "CAN-Bus ESC."]
747    ESC_CONNECTION_TYPE_CAN = 4,
748    #[doc = "DShot ESC."]
749    ESC_CONNECTION_TYPE_DSHOT = 5,
750}
751impl EscConnectionType {
752    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
753}
754impl Default for EscConnectionType {
755    fn default() -> Self {
756        Self::DEFAULT
757    }
758}
759bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
760impl EscFailureFlags {
761    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
762}
763impl Default for EscFailureFlags {
764    fn default() -> Self {
765        Self::DEFAULT
766    }
767}
768bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
769impl EstimatorStatusFlags {
770    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
771}
772impl Default for EstimatorStatusFlags {
773    fn default() -> Self {
774        Self::DEFAULT
775    }
776}
777#[cfg_attr(feature = "ts", derive(TS))]
778#[cfg_attr(feature = "ts", ts(export))]
779#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
781#[cfg_attr(feature = "serde", serde(tag = "type"))]
782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
783#[repr(u32)]
784#[doc = "List of possible failure type to inject."]
785pub enum FailureType {
786    #[doc = "No failure injected, used to reset a previous failure."]
787    FAILURE_TYPE_OK = 0,
788    #[doc = "Sets unit off, so completely non-responsive."]
789    FAILURE_TYPE_OFF = 1,
790    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
791    FAILURE_TYPE_STUCK = 2,
792    #[doc = "Unit is reporting complete garbage."]
793    FAILURE_TYPE_GARBAGE = 3,
794    #[doc = "Unit is consistently wrong."]
795    FAILURE_TYPE_WRONG = 4,
796    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
797    FAILURE_TYPE_SLOW = 5,
798    #[doc = "Data of unit is delayed in time."]
799    FAILURE_TYPE_DELAYED = 6,
800    #[doc = "Unit is sometimes working, sometimes not."]
801    FAILURE_TYPE_INTERMITTENT = 7,
802}
803impl FailureType {
804    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
805}
806impl Default for FailureType {
807    fn default() -> Self {
808        Self::DEFAULT
809    }
810}
811#[cfg_attr(feature = "ts", derive(TS))]
812#[cfg_attr(feature = "ts", ts(export))]
813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
815#[cfg_attr(feature = "serde", serde(tag = "type"))]
816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
817#[repr(u32)]
818#[doc = "List of possible units where failures can be injected."]
819pub enum FailureUnit {
820    FAILURE_UNIT_SENSOR_GYRO = 0,
821    FAILURE_UNIT_SENSOR_ACCEL = 1,
822    FAILURE_UNIT_SENSOR_MAG = 2,
823    FAILURE_UNIT_SENSOR_BARO = 3,
824    FAILURE_UNIT_SENSOR_GPS = 4,
825    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
826    FAILURE_UNIT_SENSOR_VIO = 6,
827    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
828    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
829    FAILURE_UNIT_SYSTEM_BATTERY = 100,
830    FAILURE_UNIT_SYSTEM_MOTOR = 101,
831    FAILURE_UNIT_SYSTEM_SERVO = 102,
832    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
833    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
834    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
835}
836impl FailureUnit {
837    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
838}
839impl Default for FailureUnit {
840    fn default() -> Self {
841        Self::DEFAULT
842    }
843}
844#[cfg_attr(feature = "ts", derive(TS))]
845#[cfg_attr(feature = "ts", ts(export))]
846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
848#[cfg_attr(feature = "serde", serde(tag = "type"))]
849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
850#[repr(u32)]
851pub enum FenceBreach {
852    #[doc = "No last fence breach"]
853    FENCE_BREACH_NONE = 0,
854    #[doc = "Breached minimum altitude"]
855    FENCE_BREACH_MINALT = 1,
856    #[doc = "Breached maximum altitude"]
857    FENCE_BREACH_MAXALT = 2,
858    #[doc = "Breached fence boundary"]
859    FENCE_BREACH_BOUNDARY = 3,
860}
861impl FenceBreach {
862    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
863}
864impl Default for FenceBreach {
865    fn default() -> Self {
866        Self::DEFAULT
867    }
868}
869#[cfg_attr(feature = "ts", derive(TS))]
870#[cfg_attr(feature = "ts", ts(export))]
871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
873#[cfg_attr(feature = "serde", serde(tag = "type"))]
874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
875#[repr(u32)]
876#[doc = "Actions being taken to mitigate/prevent fence breach"]
877pub enum FenceMitigate {
878    #[doc = "Unknown"]
879    FENCE_MITIGATE_UNKNOWN = 0,
880    #[doc = "No actions being taken"]
881    FENCE_MITIGATE_NONE = 1,
882    #[doc = "Velocity limiting active to prevent breach"]
883    FENCE_MITIGATE_VEL_LIMIT = 2,
884}
885impl FenceMitigate {
886    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
887}
888impl Default for FenceMitigate {
889    fn default() -> Self {
890        Self::DEFAULT
891    }
892}
893#[cfg_attr(feature = "ts", derive(TS))]
894#[cfg_attr(feature = "ts", ts(export))]
895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
897#[cfg_attr(feature = "serde", serde(tag = "type"))]
898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
899#[repr(u32)]
900#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
901pub enum FenceType {
902    #[doc = "Maximum altitude fence"]
903    FENCE_TYPE_ALT_MAX = 1,
904    #[doc = "Circle fence"]
905    FENCE_TYPE_CIRCLE = 2,
906    #[doc = "Polygon fence"]
907    FENCE_TYPE_POLYGON = 4,
908    #[doc = "Minimum altitude fence"]
909    FENCE_TYPE_ALT_MIN = 8,
910}
911impl FenceType {
912    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
913}
914impl Default for FenceType {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919#[cfg_attr(feature = "ts", derive(TS))]
920#[cfg_attr(feature = "ts", ts(export))]
921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
923#[cfg_attr(feature = "serde", serde(tag = "type"))]
924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
925#[repr(u32)]
926#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
927pub enum FirmwareVersionType {
928    #[doc = "development release"]
929    FIRMWARE_VERSION_TYPE_DEV = 0,
930    #[doc = "alpha release"]
931    FIRMWARE_VERSION_TYPE_ALPHA = 64,
932    #[doc = "beta release"]
933    FIRMWARE_VERSION_TYPE_BETA = 128,
934    #[doc = "release candidate"]
935    FIRMWARE_VERSION_TYPE_RC = 192,
936    #[doc = "official stable release"]
937    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
938}
939impl FirmwareVersionType {
940    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
941}
942impl Default for FirmwareVersionType {
943    fn default() -> Self {
944        Self::DEFAULT
945    }
946}
947bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
948impl GimbalDeviceCapFlags {
949    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
950}
951impl Default for GimbalDeviceCapFlags {
952    fn default() -> Self {
953        Self::DEFAULT
954    }
955}
956bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
957impl GimbalDeviceErrorFlags {
958    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
959}
960impl Default for GimbalDeviceErrorFlags {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
966impl GimbalDeviceFlags {
967    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
968}
969impl Default for GimbalDeviceFlags {
970    fn default() -> Self {
971        Self::DEFAULT
972    }
973}
974bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
975impl GimbalManagerCapFlags {
976    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
977}
978impl Default for GimbalManagerCapFlags {
979    fn default() -> Self {
980        Self::DEFAULT
981    }
982}
983bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
984impl GimbalManagerFlags {
985    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
986}
987impl Default for GimbalManagerFlags {
988    fn default() -> Self {
989        Self::DEFAULT
990    }
991}
992#[cfg_attr(feature = "ts", derive(TS))]
993#[cfg_attr(feature = "ts", ts(export))]
994#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
996#[cfg_attr(feature = "serde", serde(tag = "type"))]
997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
998#[repr(u32)]
999#[doc = "Type of GPS fix"]
1000pub enum GpsFixType {
1001    #[doc = "No GPS connected"]
1002    GPS_FIX_TYPE_NO_GPS = 0,
1003    #[doc = "No position information, GPS is connected"]
1004    GPS_FIX_TYPE_NO_FIX = 1,
1005    #[doc = "2D position"]
1006    GPS_FIX_TYPE_2D_FIX = 2,
1007    #[doc = "3D position"]
1008    GPS_FIX_TYPE_3D_FIX = 3,
1009    #[doc = "DGPS/SBAS aided 3D position"]
1010    GPS_FIX_TYPE_DGPS = 4,
1011    #[doc = "RTK float, 3D position"]
1012    GPS_FIX_TYPE_RTK_FLOAT = 5,
1013    #[doc = "RTK Fixed, 3D position"]
1014    GPS_FIX_TYPE_RTK_FIXED = 6,
1015    #[doc = "Static fixed, typically used for base stations"]
1016    GPS_FIX_TYPE_STATIC = 7,
1017    #[doc = "PPP, 3D position."]
1018    GPS_FIX_TYPE_PPP = 8,
1019}
1020impl GpsFixType {
1021    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1022}
1023impl Default for GpsFixType {
1024    fn default() -> Self {
1025        Self::DEFAULT
1026    }
1027}
1028bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1029impl GpsInputIgnoreFlags {
1030    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1031}
1032impl Default for GpsInputIgnoreFlags {
1033    fn default() -> Self {
1034        Self::DEFAULT
1035    }
1036}
1037#[cfg_attr(feature = "ts", derive(TS))]
1038#[cfg_attr(feature = "ts", ts(export))]
1039#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1041#[cfg_attr(feature = "serde", serde(tag = "type"))]
1042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1043#[repr(u32)]
1044#[doc = "Gripper actions."]
1045pub enum GripperActions {
1046    #[doc = "Gripper release cargo."]
1047    GRIPPER_ACTION_RELEASE = 0,
1048    #[doc = "Gripper grab onto cargo."]
1049    GRIPPER_ACTION_GRAB = 1,
1050}
1051impl GripperActions {
1052    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1053}
1054impl Default for GripperActions {
1055    fn default() -> Self {
1056        Self::DEFAULT
1057    }
1058}
1059bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1060impl HighresImuUpdatedFlags {
1061    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1062}
1063impl Default for HighresImuUpdatedFlags {
1064    fn default() -> Self {
1065        Self::DEFAULT
1066    }
1067}
1068bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1069impl HilActuatorControlsFlags {
1070    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1071}
1072impl Default for HilActuatorControlsFlags {
1073    fn default() -> Self {
1074        Self::DEFAULT
1075    }
1076}
1077bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1078impl HilSensorUpdatedFlags {
1079    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1080}
1081impl Default for HilSensorUpdatedFlags {
1082    fn default() -> Self {
1083        Self::DEFAULT
1084    }
1085}
1086bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1087impl HlFailureFlag {
1088    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1089}
1090impl Default for HlFailureFlag {
1091    fn default() -> Self {
1092        Self::DEFAULT
1093    }
1094}
1095bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1096impl IlluminatorErrorFlags {
1097    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1098}
1099impl Default for IlluminatorErrorFlags {
1100    fn default() -> Self {
1101        Self::DEFAULT
1102    }
1103}
1104#[cfg_attr(feature = "ts", derive(TS))]
1105#[cfg_attr(feature = "ts", ts(export))]
1106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1108#[cfg_attr(feature = "serde", serde(tag = "type"))]
1109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1110#[repr(u32)]
1111#[doc = "Modes of illuminator"]
1112pub enum IlluminatorMode {
1113    #[doc = "Illuminator mode is not specified/unknown"]
1114    ILLUMINATOR_MODE_UNKNOWN = 0,
1115    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1116    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1117    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1118    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1119}
1120impl IlluminatorMode {
1121    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1122}
1123impl Default for IlluminatorMode {
1124    fn default() -> Self {
1125        Self::DEFAULT
1126    }
1127}
1128#[cfg_attr(feature = "ts", derive(TS))]
1129#[cfg_attr(feature = "ts", ts(export))]
1130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1132#[cfg_attr(feature = "serde", serde(tag = "type"))]
1133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1134#[repr(u32)]
1135#[doc = "Type of landing target"]
1136pub enum LandingTargetType {
1137    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1138    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1139    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1140    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1141    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1142    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1143    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1144    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1145}
1146impl LandingTargetType {
1147    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1148}
1149impl Default for LandingTargetType {
1150    fn default() -> Self {
1151        Self::DEFAULT
1152    }
1153}
1154#[cfg_attr(feature = "ts", derive(TS))]
1155#[cfg_attr(feature = "ts", ts(export))]
1156#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1158#[cfg_attr(feature = "serde", serde(tag = "type"))]
1159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1160#[repr(u32)]
1161pub enum MagCalStatus {
1162    MAG_CAL_NOT_STARTED = 0,
1163    MAG_CAL_WAITING_TO_START = 1,
1164    MAG_CAL_RUNNING_STEP_ONE = 2,
1165    MAG_CAL_RUNNING_STEP_TWO = 3,
1166    MAG_CAL_SUCCESS = 4,
1167    MAG_CAL_FAILED = 5,
1168    MAG_CAL_BAD_ORIENTATION = 6,
1169    MAG_CAL_BAD_RADIUS = 7,
1170}
1171impl MagCalStatus {
1172    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1173}
1174impl Default for MagCalStatus {
1175    fn default() -> Self {
1176        Self::DEFAULT
1177    }
1178}
1179#[cfg_attr(feature = "ts", derive(TS))]
1180#[cfg_attr(feature = "ts", ts(export))]
1181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1183#[cfg_attr(feature = "serde", serde(tag = "type"))]
1184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1185#[repr(u32)]
1186pub enum MavArmAuthDeniedReason {
1187    #[doc = "Not a specific reason"]
1188    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1189    #[doc = "Authorizer will send the error as string to GCS"]
1190    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1191    #[doc = "At least one waypoint have a invalid value"]
1192    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1193    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1194    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1195    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1196    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1197    #[doc = "Weather is not good to fly"]
1198    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1199}
1200impl MavArmAuthDeniedReason {
1201    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1202}
1203impl Default for MavArmAuthDeniedReason {
1204    fn default() -> Self {
1205        Self::DEFAULT
1206    }
1207}
1208#[cfg_attr(feature = "ts", derive(TS))]
1209#[cfg_attr(feature = "ts", ts(export))]
1210#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1212#[cfg_attr(feature = "serde", serde(tag = "type"))]
1213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1214#[repr(u32)]
1215#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1216pub enum MavAutopilot {
1217    #[doc = "Generic autopilot, full support for everything"]
1218    MAV_AUTOPILOT_GENERIC = 0,
1219    #[doc = "Reserved for future use."]
1220    MAV_AUTOPILOT_RESERVED = 1,
1221    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1222    MAV_AUTOPILOT_SLUGS = 2,
1223    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1224    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1225    #[doc = "OpenPilot, <http://openpilot.org>"]
1226    MAV_AUTOPILOT_OPENPILOT = 4,
1227    #[doc = "Generic autopilot only supporting simple waypoints"]
1228    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1229    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1230    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1231    #[doc = "Generic autopilot supporting the full mission command set"]
1232    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1233    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1234    MAV_AUTOPILOT_INVALID = 8,
1235    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1236    MAV_AUTOPILOT_PPZ = 9,
1237    #[doc = "UAV Dev Board"]
1238    MAV_AUTOPILOT_UDB = 10,
1239    #[doc = "FlexiPilot"]
1240    MAV_AUTOPILOT_FP = 11,
1241    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1242    MAV_AUTOPILOT_PX4 = 12,
1243    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1244    MAV_AUTOPILOT_SMACCMPILOT = 13,
1245    #[doc = "AutoQuad -- <http://autoquad.org>"]
1246    MAV_AUTOPILOT_AUTOQUAD = 14,
1247    #[doc = "Armazila -- <http://armazila.com>"]
1248    MAV_AUTOPILOT_ARMAZILA = 15,
1249    #[doc = "Aerob -- <http://aerob.ru>"]
1250    MAV_AUTOPILOT_AEROB = 16,
1251    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1252    MAV_AUTOPILOT_ASLUAV = 17,
1253    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1254    MAV_AUTOPILOT_SMARTAP = 18,
1255    #[doc = "AirRails - <http://uaventure.com>"]
1256    MAV_AUTOPILOT_AIRRAILS = 19,
1257    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1258    MAV_AUTOPILOT_REFLEX = 20,
1259}
1260impl MavAutopilot {
1261    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1262}
1263impl Default for MavAutopilot {
1264    fn default() -> Self {
1265        Self::DEFAULT
1266    }
1267}
1268#[cfg_attr(feature = "ts", derive(TS))]
1269#[cfg_attr(feature = "ts", ts(export))]
1270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1272#[cfg_attr(feature = "serde", serde(tag = "type"))]
1273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1274#[repr(u32)]
1275#[doc = "Enumeration for battery charge states."]
1276pub enum MavBatteryChargeState {
1277    #[doc = "Low battery state is not provided"]
1278    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1279    #[doc = "Battery is not in low state. Normal operation."]
1280    MAV_BATTERY_CHARGE_STATE_OK = 1,
1281    #[doc = "Battery state is low, warn and monitor close."]
1282    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1283    #[doc = "Battery state is critical, return or abort immediately."]
1284    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1285    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1286    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1287    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1288    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1289    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1290    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1291    #[doc = "Battery is charging."]
1292    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1293}
1294impl MavBatteryChargeState {
1295    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1296}
1297impl Default for MavBatteryChargeState {
1298    fn default() -> Self {
1299        Self::DEFAULT
1300    }
1301}
1302bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1303impl MavBatteryFault {
1304    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1305}
1306impl Default for MavBatteryFault {
1307    fn default() -> Self {
1308        Self::DEFAULT
1309    }
1310}
1311#[cfg_attr(feature = "ts", derive(TS))]
1312#[cfg_attr(feature = "ts", ts(export))]
1313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1315#[cfg_attr(feature = "serde", serde(tag = "type"))]
1316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1317#[repr(u32)]
1318#[doc = "Enumeration of battery functions"]
1319pub enum MavBatteryFunction {
1320    #[doc = "Battery function is unknown"]
1321    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1322    #[doc = "Battery supports all flight systems"]
1323    MAV_BATTERY_FUNCTION_ALL = 1,
1324    #[doc = "Battery for the propulsion system"]
1325    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1326    #[doc = "Avionics battery"]
1327    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1328    #[doc = "Payload battery"]
1329    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1330}
1331impl MavBatteryFunction {
1332    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1333}
1334impl Default for MavBatteryFunction {
1335    fn default() -> Self {
1336        Self::DEFAULT
1337    }
1338}
1339#[cfg_attr(feature = "ts", derive(TS))]
1340#[cfg_attr(feature = "ts", ts(export))]
1341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1343#[cfg_attr(feature = "serde", serde(tag = "type"))]
1344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1345#[repr(u32)]
1346#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1347pub enum MavBatteryMode {
1348    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1349    MAV_BATTERY_MODE_UNKNOWN = 0,
1350    #[doc = "Battery is auto discharging (towards storage level)."]
1351    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1352    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1353    MAV_BATTERY_MODE_HOT_SWAP = 2,
1354}
1355impl MavBatteryMode {
1356    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1357}
1358impl Default for MavBatteryMode {
1359    fn default() -> Self {
1360        Self::DEFAULT
1361    }
1362}
1363#[cfg_attr(feature = "ts", derive(TS))]
1364#[cfg_attr(feature = "ts", ts(export))]
1365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1367#[cfg_attr(feature = "serde", serde(tag = "type"))]
1368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1369#[repr(u32)]
1370#[doc = "Enumeration of battery types"]
1371pub enum MavBatteryType {
1372    #[doc = "Not specified."]
1373    MAV_BATTERY_TYPE_UNKNOWN = 0,
1374    #[doc = "Lithium polymer battery"]
1375    MAV_BATTERY_TYPE_LIPO = 1,
1376    #[doc = "Lithium-iron-phosphate battery"]
1377    MAV_BATTERY_TYPE_LIFE = 2,
1378    #[doc = "Lithium-ION battery"]
1379    MAV_BATTERY_TYPE_LION = 3,
1380    #[doc = "Nickel metal hydride battery"]
1381    MAV_BATTERY_TYPE_NIMH = 4,
1382}
1383impl MavBatteryType {
1384    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1385}
1386impl Default for MavBatteryType {
1387    fn default() -> Self {
1388        Self::DEFAULT
1389    }
1390}
1391#[cfg_attr(feature = "ts", derive(TS))]
1392#[cfg_attr(feature = "ts", ts(export))]
1393#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1395#[cfg_attr(feature = "serde", serde(tag = "type"))]
1396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1397#[repr(u32)]
1398#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1399pub enum MavCmd {
1400    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1401    MAV_CMD_NAV_WAYPOINT = 16,
1402    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1403    MAV_CMD_NAV_LOITER_UNLIM = 17,
1404    #[doc = "Loiter around this waypoint for X turns"]
1405    MAV_CMD_NAV_LOITER_TURNS = 18,
1406    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1407    MAV_CMD_NAV_LOITER_TIME = 19,
1408    #[doc = "Return to launch location"]
1409    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1410    #[doc = "Land at location."]
1411    MAV_CMD_NAV_LAND = 21,
1412    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1413    MAV_CMD_NAV_TAKEOFF = 22,
1414    #[doc = "Land at local position (local frame only)"]
1415    MAV_CMD_NAV_LAND_LOCAL = 23,
1416    #[doc = "Takeoff from local position (local frame only)"]
1417    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1418    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1419    MAV_CMD_NAV_FOLLOW = 25,
1420    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1421    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1422    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1423    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1424    #[doc = "Begin following a target"]
1425    MAV_CMD_DO_FOLLOW = 32,
1426    #[doc = "Reposition the MAV after a follow target command has been sent"]
1427    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1428    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1429    MAV_CMD_DO_ORBIT = 34,
1430    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1431    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1432    MAV_CMD_NAV_ROI = 80,
1433    #[doc = "Control autonomous path planning on the MAV."]
1434    MAV_CMD_NAV_PATHPLANNING = 81,
1435    #[doc = "Navigate to waypoint using a spline path."]
1436    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1437    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1438    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1439    #[doc = "Land using VTOL mode"]
1440    MAV_CMD_NAV_VTOL_LAND = 85,
1441    #[doc = "hand control over to an external controller"]
1442    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1443    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1444    MAV_CMD_NAV_DELAY = 93,
1445    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1446    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1447    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1448    MAV_CMD_NAV_LAST = 95,
1449    #[doc = "Delay mission state machine."]
1450    MAV_CMD_CONDITION_DELAY = 112,
1451    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1452    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1453    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1454    MAV_CMD_CONDITION_DISTANCE = 114,
1455    #[doc = "Reach a certain target angle."]
1456    MAV_CMD_CONDITION_YAW = 115,
1457    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1458    MAV_CMD_CONDITION_LAST = 159,
1459    #[doc = "Set system mode."]
1460    MAV_CMD_DO_SET_MODE = 176,
1461    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1462    MAV_CMD_DO_JUMP = 177,
1463    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1464    MAV_CMD_DO_CHANGE_SPEED = 178,
1465    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1466    MAV_CMD_DO_SET_HOME = 179,
1467    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1468    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1469    MAV_CMD_DO_SET_PARAMETER = 180,
1470    #[doc = "Set a relay to a condition."]
1471    MAV_CMD_DO_SET_RELAY = 181,
1472    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1473    MAV_CMD_DO_REPEAT_RELAY = 182,
1474    #[doc = "Set a servo to a desired PWM value."]
1475    MAV_CMD_DO_SET_SERVO = 183,
1476    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1477    MAV_CMD_DO_REPEAT_SERVO = 184,
1478    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1479    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1480    #[doc = "Change altitude set point."]
1481    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1482    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1483    MAV_CMD_DO_SET_ACTUATOR = 187,
1484    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1485    MAV_CMD_DO_RETURN_PATH_START = 188,
1486    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1487    MAV_CMD_DO_LAND_START = 189,
1488    #[doc = "Mission command to perform a landing from a rally point."]
1489    MAV_CMD_DO_RALLY_LAND = 190,
1490    #[doc = "Mission command to safely abort an autonomous landing."]
1491    MAV_CMD_DO_GO_AROUND = 191,
1492    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1493    MAV_CMD_DO_REPOSITION = 192,
1494    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1495    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1496    #[doc = "Set moving direction to forward or reverse."]
1497    MAV_CMD_DO_SET_REVERSE = 194,
1498    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1499    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1500    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1501    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1502    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1503    MAV_CMD_DO_SET_ROI_NONE = 197,
1504    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1505    MAV_CMD_DO_SET_ROI_SYSID = 198,
1506    #[doc = "Control onboard camera system."]
1507    MAV_CMD_DO_CONTROL_VIDEO = 200,
1508    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1509    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1510    MAV_CMD_DO_SET_ROI = 201,
1511    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1512    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1513    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1514    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1515    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to configure a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1518    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1519    #[doc = "Mission command to control a camera or antenna mount"]
1520    MAV_CMD_DO_MOUNT_CONTROL = 205,
1521    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1522    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1523    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1524    MAV_CMD_DO_FENCE_ENABLE = 207,
1525    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1526    MAV_CMD_DO_PARACHUTE = 208,
1527    #[doc = "Command to perform motor test."]
1528    MAV_CMD_DO_MOTOR_TEST = 209,
1529    #[doc = "Change to/from inverted flight."]
1530    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1531    #[doc = "Mission command to operate a gripper."]
1532    MAV_CMD_DO_GRIPPER = 211,
1533    #[doc = "Enable/disable autotune."]
1534    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1535    #[doc = "Sets a desired vehicle turn angle and speed change."]
1536    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1537    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1538    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1539    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1540    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1541    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1542    #[doc = "set id of master controller"]
1543    MAV_CMD_DO_GUIDED_MASTER = 221,
1544    #[doc = "Set limits for external control"]
1545    MAV_CMD_DO_GUIDED_LIMITS = 222,
1546    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1547    MAV_CMD_DO_ENGINE_CONTROL = 223,
1548    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1549    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1550    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1551    MAV_CMD_DO_LAST = 240,
1552    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1553    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1554    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1555    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1556    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1557    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1558    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1559    MAV_CMD_PREFLIGHT_STORAGE = 245,
1560    #[doc = "Request the reboot or shutdown of system components."]
1561    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1562    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1563    MAV_CMD_OVERRIDE_GOTO = 252,
1564    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1565    MAV_CMD_OBLIQUE_SURVEY = 260,
1566    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1567    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1568    #[doc = "start running a mission"]
1569    MAV_CMD_MISSION_START = 300,
1570    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1571    MAV_CMD_ACTUATOR_TEST = 310,
1572    #[doc = "Actuator configuration command."]
1573    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1574    #[doc = "Arms / Disarms a component"]
1575    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1576    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1577    MAV_CMD_RUN_PREARM_CHECKS = 401,
1578    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1579    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1580    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1581    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1582    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1583    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1584    MAV_CMD_GET_HOME_POSITION = 410,
1585    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1586    MAV_CMD_INJECT_FAILURE = 420,
1587    #[doc = "Starts receiver pairing."]
1588    MAV_CMD_START_RX_PAIR = 500,
1589    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1590    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1591    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1592    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1593    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1594    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1595    MAV_CMD_REQUEST_MESSAGE = 512,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1598    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1601    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1604    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1607    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1608    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1609    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1610    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1611    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1612    MAV_CMD_STORAGE_FORMAT = 526,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1615    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1616    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1617    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1618    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1619    #[doc = "Reset all camera settings to Factory Default"]
1620    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1621    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1622    MAV_CMD_SET_CAMERA_MODE = 530,
1623    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1624    MAV_CMD_SET_CAMERA_ZOOM = 531,
1625    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1626    MAV_CMD_SET_CAMERA_FOCUS = 532,
1627    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1628    MAV_CMD_SET_STORAGE_USAGE = 533,
1629    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1630    MAV_CMD_SET_CAMERA_SOURCE = 534,
1631    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1632    MAV_CMD_JUMP_TAG = 600,
1633    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1634    MAV_CMD_DO_JUMP_TAG = 601,
1635    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1636    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1637    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1638    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1639    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1640    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1641    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1642    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1643    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1644    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1645    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1646    #[doc = "Enable or disable on-board camera triggering system."]
1647    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1648    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1649    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1650    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1651    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1652    #[doc = "Stops ongoing tracking."]
1653    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1654    #[doc = "Starts video capture (recording)."]
1655    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1656    #[doc = "Stop the current video capture (recording)."]
1657    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1658    #[doc = "Start video streaming"]
1659    MAV_CMD_VIDEO_START_STREAMING = 2502,
1660    #[doc = "Stop the given video stream"]
1661    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1665    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1666    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1667    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1668    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1669    MAV_CMD_LOGGING_START = 2510,
1670    #[doc = "Request to stop streaming log data over MAVLink"]
1671    MAV_CMD_LOGGING_STOP = 2511,
1672    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1673    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1674    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1675    #[doc = "Create a panorama at the current position"]
1676    MAV_CMD_PANORAMA_CREATE = 2800,
1677    #[doc = "Request VTOL transition"]
1678    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1679    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1680    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1681    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1682    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1683    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1684    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1685    #[doc = "Delay mission state machine until gate has been reached."]
1686    MAV_CMD_CONDITION_GATE = 4501,
1687    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1688    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1689    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1690    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1691    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1692    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1693    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1694    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1695    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1696    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1697    #[doc = "Rally point. You can have multiple rally points defined."]
1698    MAV_CMD_NAV_RALLY_POINT = 5100,
1699    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1700    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1701    #[doc = "Change state of safety switch."]
1702    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1703    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1704    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1707    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1708    #[deprecated = "  (Deprecated since 2021-06)"]
1709    #[doc = "Control the payload deployment."]
1710    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1711    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1712    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1713    #[doc = "Command to operate winch."]
1714    MAV_CMD_DO_WINCH = 42600,
1715    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1716    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1717    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1718    MAV_CMD_WAYPOINT_USER_1 = 31000,
1719    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1720    MAV_CMD_WAYPOINT_USER_2 = 31001,
1721    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1722    MAV_CMD_WAYPOINT_USER_3 = 31002,
1723    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1724    MAV_CMD_WAYPOINT_USER_4 = 31003,
1725    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1726    MAV_CMD_WAYPOINT_USER_5 = 31004,
1727    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1728    MAV_CMD_SPATIAL_USER_1 = 31005,
1729    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1730    MAV_CMD_SPATIAL_USER_2 = 31006,
1731    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1732    MAV_CMD_SPATIAL_USER_3 = 31007,
1733    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1734    MAV_CMD_SPATIAL_USER_4 = 31008,
1735    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1736    MAV_CMD_SPATIAL_USER_5 = 31009,
1737    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1738    MAV_CMD_USER_1 = 31010,
1739    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1740    MAV_CMD_USER_2 = 31011,
1741    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1742    MAV_CMD_USER_3 = 31012,
1743    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1744    MAV_CMD_USER_4 = 31013,
1745    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1746    MAV_CMD_USER_5 = 31014,
1747    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1748    MAV_CMD_CAN_FORWARD = 32000,
1749}
1750impl MavCmd {
1751    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1752}
1753impl Default for MavCmd {
1754    fn default() -> Self {
1755        Self::DEFAULT
1756    }
1757}
1758#[cfg_attr(feature = "ts", derive(TS))]
1759#[cfg_attr(feature = "ts", ts(export))]
1760#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1762#[cfg_attr(feature = "serde", serde(tag = "type"))]
1763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1764#[repr(u32)]
1765#[doc = "Possible actions an aircraft can take to avoid a collision."]
1766pub enum MavCollisionAction {
1767    #[doc = "Ignore any potential collisions"]
1768    MAV_COLLISION_ACTION_NONE = 0,
1769    #[doc = "Report potential collision"]
1770    MAV_COLLISION_ACTION_REPORT = 1,
1771    #[doc = "Ascend or Descend to avoid threat"]
1772    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1773    #[doc = "Move horizontally to avoid threat"]
1774    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1775    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1776    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1777    #[doc = "Aircraft to fly directly back to its launch point"]
1778    MAV_COLLISION_ACTION_RTL = 5,
1779    #[doc = "Aircraft to stop in place"]
1780    MAV_COLLISION_ACTION_HOVER = 6,
1781}
1782impl MavCollisionAction {
1783    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1784}
1785impl Default for MavCollisionAction {
1786    fn default() -> Self {
1787        Self::DEFAULT
1788    }
1789}
1790#[cfg_attr(feature = "ts", derive(TS))]
1791#[cfg_attr(feature = "ts", ts(export))]
1792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1794#[cfg_attr(feature = "serde", serde(tag = "type"))]
1795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1796#[repr(u32)]
1797#[doc = "Source of information about this collision."]
1798pub enum MavCollisionSrc {
1799    #[doc = "ID field references ADSB_VEHICLE packets"]
1800    MAV_COLLISION_SRC_ADSB = 0,
1801    #[doc = "ID field references MAVLink SRC ID"]
1802    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1803}
1804impl MavCollisionSrc {
1805    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1806}
1807impl Default for MavCollisionSrc {
1808    fn default() -> Self {
1809        Self::DEFAULT
1810    }
1811}
1812#[cfg_attr(feature = "ts", derive(TS))]
1813#[cfg_attr(feature = "ts", ts(export))]
1814#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1816#[cfg_attr(feature = "serde", serde(tag = "type"))]
1817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1818#[repr(u32)]
1819#[doc = "Aircraft-rated danger from this threat."]
1820pub enum MavCollisionThreatLevel {
1821    #[doc = "Not a threat"]
1822    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1823    #[doc = "Craft is mildly concerned about this threat"]
1824    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1825    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1826    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1827}
1828impl MavCollisionThreatLevel {
1829    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1830}
1831impl Default for MavCollisionThreatLevel {
1832    fn default() -> Self {
1833        Self::DEFAULT
1834    }
1835}
1836#[cfg_attr(feature = "ts", derive(TS))]
1837#[cfg_attr(feature = "ts", ts(export))]
1838#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1840#[cfg_attr(feature = "serde", serde(tag = "type"))]
1841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1842#[repr(u32)]
1843#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1844pub enum MavComponent {
1845    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1846    MAV_COMP_ID_ALL = 0,
1847    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1848    MAV_COMP_ID_AUTOPILOT1 = 1,
1849    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1850    MAV_COMP_ID_USER1 = 25,
1851    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1852    MAV_COMP_ID_USER2 = 26,
1853    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1854    MAV_COMP_ID_USER3 = 27,
1855    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1856    MAV_COMP_ID_USER4 = 28,
1857    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1858    MAV_COMP_ID_USER5 = 29,
1859    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1860    MAV_COMP_ID_USER6 = 30,
1861    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1862    MAV_COMP_ID_USER7 = 31,
1863    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1864    MAV_COMP_ID_USER8 = 32,
1865    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1866    MAV_COMP_ID_USER9 = 33,
1867    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1868    MAV_COMP_ID_USER10 = 34,
1869    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1870    MAV_COMP_ID_USER11 = 35,
1871    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1872    MAV_COMP_ID_USER12 = 36,
1873    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1874    MAV_COMP_ID_USER13 = 37,
1875    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1876    MAV_COMP_ID_USER14 = 38,
1877    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1878    MAV_COMP_ID_USER15 = 39,
1879    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1880    MAV_COMP_ID_USER16 = 40,
1881    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1882    MAV_COMP_ID_USER17 = 41,
1883    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1884    MAV_COMP_ID_USER18 = 42,
1885    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1886    MAV_COMP_ID_USER19 = 43,
1887    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1888    MAV_COMP_ID_USER20 = 44,
1889    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1890    MAV_COMP_ID_USER21 = 45,
1891    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1892    MAV_COMP_ID_USER22 = 46,
1893    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1894    MAV_COMP_ID_USER23 = 47,
1895    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1896    MAV_COMP_ID_USER24 = 48,
1897    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1898    MAV_COMP_ID_USER25 = 49,
1899    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1900    MAV_COMP_ID_USER26 = 50,
1901    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1902    MAV_COMP_ID_USER27 = 51,
1903    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1904    MAV_COMP_ID_USER28 = 52,
1905    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1906    MAV_COMP_ID_USER29 = 53,
1907    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1908    MAV_COMP_ID_USER30 = 54,
1909    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1910    MAV_COMP_ID_USER31 = 55,
1911    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1912    MAV_COMP_ID_USER32 = 56,
1913    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1914    MAV_COMP_ID_USER33 = 57,
1915    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1916    MAV_COMP_ID_USER34 = 58,
1917    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1918    MAV_COMP_ID_USER35 = 59,
1919    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1920    MAV_COMP_ID_USER36 = 60,
1921    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1922    MAV_COMP_ID_USER37 = 61,
1923    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1924    MAV_COMP_ID_USER38 = 62,
1925    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1926    MAV_COMP_ID_USER39 = 63,
1927    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1928    MAV_COMP_ID_USER40 = 64,
1929    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1930    MAV_COMP_ID_USER41 = 65,
1931    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1932    MAV_COMP_ID_USER42 = 66,
1933    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1934    MAV_COMP_ID_USER43 = 67,
1935    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1936    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1937    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1938    MAV_COMP_ID_USER45 = 69,
1939    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1940    MAV_COMP_ID_USER46 = 70,
1941    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1942    MAV_COMP_ID_USER47 = 71,
1943    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1944    MAV_COMP_ID_USER48 = 72,
1945    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1946    MAV_COMP_ID_USER49 = 73,
1947    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1948    MAV_COMP_ID_USER50 = 74,
1949    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1950    MAV_COMP_ID_USER51 = 75,
1951    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1952    MAV_COMP_ID_USER52 = 76,
1953    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1954    MAV_COMP_ID_USER53 = 77,
1955    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1956    MAV_COMP_ID_USER54 = 78,
1957    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1958    MAV_COMP_ID_USER55 = 79,
1959    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1960    MAV_COMP_ID_USER56 = 80,
1961    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1962    MAV_COMP_ID_USER57 = 81,
1963    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1964    MAV_COMP_ID_USER58 = 82,
1965    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1966    MAV_COMP_ID_USER59 = 83,
1967    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1968    MAV_COMP_ID_USER60 = 84,
1969    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1970    MAV_COMP_ID_USER61 = 85,
1971    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1972    MAV_COMP_ID_USER62 = 86,
1973    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1974    MAV_COMP_ID_USER63 = 87,
1975    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1976    MAV_COMP_ID_USER64 = 88,
1977    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1978    MAV_COMP_ID_USER65 = 89,
1979    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1980    MAV_COMP_ID_USER66 = 90,
1981    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1982    MAV_COMP_ID_USER67 = 91,
1983    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1984    MAV_COMP_ID_USER68 = 92,
1985    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1986    MAV_COMP_ID_USER69 = 93,
1987    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1988    MAV_COMP_ID_USER70 = 94,
1989    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1990    MAV_COMP_ID_USER71 = 95,
1991    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1992    MAV_COMP_ID_USER72 = 96,
1993    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1994    MAV_COMP_ID_USER73 = 97,
1995    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1996    MAV_COMP_ID_USER74 = 98,
1997    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1998    MAV_COMP_ID_USER75 = 99,
1999    #[doc = "Camera #1."]
2000    MAV_COMP_ID_CAMERA = 100,
2001    #[doc = "Camera #2."]
2002    MAV_COMP_ID_CAMERA2 = 101,
2003    #[doc = "Camera #3."]
2004    MAV_COMP_ID_CAMERA3 = 102,
2005    #[doc = "Camera #4."]
2006    MAV_COMP_ID_CAMERA4 = 103,
2007    #[doc = "Camera #5."]
2008    MAV_COMP_ID_CAMERA5 = 104,
2009    #[doc = "Camera #6."]
2010    MAV_COMP_ID_CAMERA6 = 105,
2011    #[doc = "Servo #1."]
2012    MAV_COMP_ID_SERVO1 = 140,
2013    #[doc = "Servo #2."]
2014    MAV_COMP_ID_SERVO2 = 141,
2015    #[doc = "Servo #3."]
2016    MAV_COMP_ID_SERVO3 = 142,
2017    #[doc = "Servo #4."]
2018    MAV_COMP_ID_SERVO4 = 143,
2019    #[doc = "Servo #5."]
2020    MAV_COMP_ID_SERVO5 = 144,
2021    #[doc = "Servo #6."]
2022    MAV_COMP_ID_SERVO6 = 145,
2023    #[doc = "Servo #7."]
2024    MAV_COMP_ID_SERVO7 = 146,
2025    #[doc = "Servo #8."]
2026    MAV_COMP_ID_SERVO8 = 147,
2027    #[doc = "Servo #9."]
2028    MAV_COMP_ID_SERVO9 = 148,
2029    #[doc = "Servo #10."]
2030    MAV_COMP_ID_SERVO10 = 149,
2031    #[doc = "Servo #11."]
2032    MAV_COMP_ID_SERVO11 = 150,
2033    #[doc = "Servo #12."]
2034    MAV_COMP_ID_SERVO12 = 151,
2035    #[doc = "Servo #13."]
2036    MAV_COMP_ID_SERVO13 = 152,
2037    #[doc = "Servo #14."]
2038    MAV_COMP_ID_SERVO14 = 153,
2039    #[doc = "Gimbal #1."]
2040    MAV_COMP_ID_GIMBAL = 154,
2041    #[doc = "Logging component."]
2042    MAV_COMP_ID_LOG = 155,
2043    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2044    MAV_COMP_ID_ADSB = 156,
2045    #[doc = "On Screen Display (OSD) devices for video links."]
2046    MAV_COMP_ID_OSD = 157,
2047    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2048    MAV_COMP_ID_PERIPHERAL = 158,
2049    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2050    #[doc = "Gimbal ID for QX1."]
2051    MAV_COMP_ID_QX1_GIMBAL = 159,
2052    #[doc = "FLARM collision alert component."]
2053    MAV_COMP_ID_FLARM = 160,
2054    #[doc = "Parachute component."]
2055    MAV_COMP_ID_PARACHUTE = 161,
2056    #[doc = "Winch component."]
2057    MAV_COMP_ID_WINCH = 169,
2058    #[doc = "Gimbal #2."]
2059    MAV_COMP_ID_GIMBAL2 = 171,
2060    #[doc = "Gimbal #3."]
2061    MAV_COMP_ID_GIMBAL3 = 172,
2062    #[doc = "Gimbal #4"]
2063    MAV_COMP_ID_GIMBAL4 = 173,
2064    #[doc = "Gimbal #5."]
2065    MAV_COMP_ID_GIMBAL5 = 174,
2066    #[doc = "Gimbal #6."]
2067    MAV_COMP_ID_GIMBAL6 = 175,
2068    #[doc = "Battery #1."]
2069    MAV_COMP_ID_BATTERY = 180,
2070    #[doc = "Battery #2."]
2071    MAV_COMP_ID_BATTERY2 = 181,
2072    #[doc = "CAN over MAVLink client."]
2073    MAV_COMP_ID_MAVCAN = 189,
2074    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2075    MAV_COMP_ID_MISSIONPLANNER = 190,
2076    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2077    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2078    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2079    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2080    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2081    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2082    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2083    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2084    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2085    MAV_COMP_ID_PATHPLANNER = 195,
2086    #[doc = "Component that plans a collision free path between two points."]
2087    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2088    #[doc = "Component that provides position estimates using VIO techniques."]
2089    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2090    #[doc = "Component that manages pairing of vehicle and GCS."]
2091    MAV_COMP_ID_PAIRING_MANAGER = 198,
2092    #[doc = "Inertial Measurement Unit (IMU) #1."]
2093    MAV_COMP_ID_IMU = 200,
2094    #[doc = "Inertial Measurement Unit (IMU) #2."]
2095    MAV_COMP_ID_IMU_2 = 201,
2096    #[doc = "Inertial Measurement Unit (IMU) #3."]
2097    MAV_COMP_ID_IMU_3 = 202,
2098    #[doc = "GPS #1."]
2099    MAV_COMP_ID_GPS = 220,
2100    #[doc = "GPS #2."]
2101    MAV_COMP_ID_GPS2 = 221,
2102    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2103    MAV_COMP_ID_ODID_TXRX_1 = 236,
2104    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2105    MAV_COMP_ID_ODID_TXRX_2 = 237,
2106    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2107    MAV_COMP_ID_ODID_TXRX_3 = 238,
2108    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2109    MAV_COMP_ID_UDP_BRIDGE = 240,
2110    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2111    MAV_COMP_ID_UART_BRIDGE = 241,
2112    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2113    MAV_COMP_ID_TUNNEL_NODE = 242,
2114    #[doc = "Illuminator"]
2115    MAV_COMP_ID_ILLUMINATOR = 243,
2116    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2117    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2118    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2119}
2120impl MavComponent {
2121    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2122}
2123impl Default for MavComponent {
2124    fn default() -> Self {
2125        Self::DEFAULT
2126    }
2127}
2128#[cfg_attr(feature = "ts", derive(TS))]
2129#[cfg_attr(feature = "ts", ts(export))]
2130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2132#[cfg_attr(feature = "serde", serde(tag = "type"))]
2133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2134#[repr(u32)]
2135#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2136#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2137pub enum MavDataStream {
2138    #[doc = "Enable all data streams"]
2139    MAV_DATA_STREAM_ALL = 0,
2140    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2141    MAV_DATA_STREAM_RAW_SENSORS = 1,
2142    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2143    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2144    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2145    MAV_DATA_STREAM_RC_CHANNELS = 3,
2146    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2147    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2148    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2149    MAV_DATA_STREAM_POSITION = 6,
2150    #[doc = "Dependent on the autopilot"]
2151    MAV_DATA_STREAM_EXTRA1 = 10,
2152    #[doc = "Dependent on the autopilot"]
2153    MAV_DATA_STREAM_EXTRA2 = 11,
2154    #[doc = "Dependent on the autopilot"]
2155    MAV_DATA_STREAM_EXTRA3 = 12,
2156}
2157impl MavDataStream {
2158    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2159}
2160impl Default for MavDataStream {
2161    fn default() -> Self {
2162        Self::DEFAULT
2163    }
2164}
2165#[cfg_attr(feature = "ts", derive(TS))]
2166#[cfg_attr(feature = "ts", ts(export))]
2167#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2169#[cfg_attr(feature = "serde", serde(tag = "type"))]
2170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2171#[repr(u32)]
2172#[doc = "Enumeration of distance sensor types"]
2173pub enum MavDistanceSensor {
2174    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2175    MAV_DISTANCE_SENSOR_LASER = 0,
2176    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2177    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2178    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2179    MAV_DISTANCE_SENSOR_INFRARED = 2,
2180    #[doc = "Radar type, e.g. uLanding units"]
2181    MAV_DISTANCE_SENSOR_RADAR = 3,
2182    #[doc = "Broken or unknown type, e.g. analog units"]
2183    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2184}
2185impl MavDistanceSensor {
2186    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2187}
2188impl Default for MavDistanceSensor {
2189    fn default() -> Self {
2190        Self::DEFAULT
2191    }
2192}
2193#[cfg_attr(feature = "ts", derive(TS))]
2194#[cfg_attr(feature = "ts", ts(export))]
2195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2197#[cfg_attr(feature = "serde", serde(tag = "type"))]
2198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2199#[repr(u32)]
2200#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2201pub enum MavDoRepositionFlags {
2202    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2203    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2204}
2205impl MavDoRepositionFlags {
2206    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2207}
2208impl Default for MavDoRepositionFlags {
2209    fn default() -> Self {
2210        Self::DEFAULT
2211    }
2212}
2213#[cfg_attr(feature = "ts", derive(TS))]
2214#[cfg_attr(feature = "ts", ts(export))]
2215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2217#[cfg_attr(feature = "serde", serde(tag = "type"))]
2218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2219#[repr(u32)]
2220#[doc = "Enumeration of estimator types"]
2221pub enum MavEstimatorType {
2222    #[doc = "Unknown type of the estimator."]
2223    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2224    #[doc = "This is a naive estimator without any real covariance feedback."]
2225    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2226    #[doc = "Computer vision based estimate. Might be up to scale."]
2227    MAV_ESTIMATOR_TYPE_VISION = 2,
2228    #[doc = "Visual-inertial estimate."]
2229    MAV_ESTIMATOR_TYPE_VIO = 3,
2230    #[doc = "Plain GPS estimate."]
2231    MAV_ESTIMATOR_TYPE_GPS = 4,
2232    #[doc = "Estimator integrating GPS and inertial sensing."]
2233    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2234    #[doc = "Estimate from external motion capturing system."]
2235    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2236    #[doc = "Estimator based on lidar sensor input."]
2237    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2238    #[doc = "Estimator on autopilot."]
2239    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2240}
2241impl MavEstimatorType {
2242    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2243}
2244impl Default for MavEstimatorType {
2245    fn default() -> Self {
2246        Self::DEFAULT
2247    }
2248}
2249#[cfg_attr(feature = "ts", derive(TS))]
2250#[cfg_attr(feature = "ts", ts(export))]
2251#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2253#[cfg_attr(feature = "serde", serde(tag = "type"))]
2254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2255#[repr(u32)]
2256#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2257pub enum MavEventCurrentSequenceFlags {
2258    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2259    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2260}
2261impl MavEventCurrentSequenceFlags {
2262    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2263}
2264impl Default for MavEventCurrentSequenceFlags {
2265    fn default() -> Self {
2266        Self::DEFAULT
2267    }
2268}
2269#[cfg_attr(feature = "ts", derive(TS))]
2270#[cfg_attr(feature = "ts", ts(export))]
2271#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2273#[cfg_attr(feature = "serde", serde(tag = "type"))]
2274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2275#[repr(u32)]
2276#[doc = "Reason for an event error response."]
2277pub enum MavEventErrorReason {
2278    #[doc = "The requested event is not available (anymore)."]
2279    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2280}
2281impl MavEventErrorReason {
2282    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2283}
2284impl Default for MavEventErrorReason {
2285    fn default() -> Self {
2286        Self::DEFAULT
2287    }
2288}
2289#[cfg_attr(feature = "ts", derive(TS))]
2290#[cfg_attr(feature = "ts", ts(export))]
2291#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2293#[cfg_attr(feature = "serde", serde(tag = "type"))]
2294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2295#[repr(u32)]
2296#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2297pub enum MavFrame {
2298    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2299    MAV_FRAME_GLOBAL = 0,
2300    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2301    MAV_FRAME_LOCAL_NED = 1,
2302    #[doc = "NOT a coordinate frame, indicates a mission command."]
2303    MAV_FRAME_MISSION = 2,
2304    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2305    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2306    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2307    MAV_FRAME_LOCAL_ENU = 4,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2310    MAV_FRAME_GLOBAL_INT = 5,
2311    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2312    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2313    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2314    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2315    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2318    MAV_FRAME_BODY_NED = 8,
2319    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2320    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2321    MAV_FRAME_BODY_OFFSET_NED = 9,
2322    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2324    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2325    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2326    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2327    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2328    MAV_FRAME_BODY_FRD = 12,
2329    #[deprecated = "  (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2331    MAV_FRAME_RESERVED_13 = 13,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2334    MAV_FRAME_RESERVED_14 = 14,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2337    MAV_FRAME_RESERVED_15 = 15,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2340    MAV_FRAME_RESERVED_16 = 16,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2343    MAV_FRAME_RESERVED_17 = 17,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2346    MAV_FRAME_RESERVED_18 = 18,
2347    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2348    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2349    MAV_FRAME_RESERVED_19 = 19,
2350    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2351    MAV_FRAME_LOCAL_FRD = 20,
2352    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2353    MAV_FRAME_LOCAL_FLU = 21,
2354}
2355impl MavFrame {
2356    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2357}
2358impl Default for MavFrame {
2359    fn default() -> Self {
2360        Self::DEFAULT
2361    }
2362}
2363#[cfg_attr(feature = "ts", derive(TS))]
2364#[cfg_attr(feature = "ts", ts(export))]
2365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2367#[cfg_attr(feature = "serde", serde(tag = "type"))]
2368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2369#[repr(u32)]
2370#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2371pub enum MavFtpErr {
2372    #[doc = "None: No error"]
2373    MAV_FTP_ERR_NONE = 0,
2374    #[doc = "Fail: Unknown failure"]
2375    MAV_FTP_ERR_FAIL = 1,
2376    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2377    MAV_FTP_ERR_FAILERRNO = 2,
2378    #[doc = "InvalidDataSize: Payload size is invalid"]
2379    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2380    #[doc = "InvalidSession: Session is not currently open"]
2381    MAV_FTP_ERR_INVALIDSESSION = 4,
2382    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2383    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2384    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2385    MAV_FTP_ERR_EOF = 6,
2386    #[doc = "UnknownCommand: Unknown command / opcode"]
2387    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2388    #[doc = "FileExists: File/directory already exists"]
2389    MAV_FTP_ERR_FILEEXISTS = 8,
2390    #[doc = "FileProtected: File/directory is write protected"]
2391    MAV_FTP_ERR_FILEPROTECTED = 9,
2392    #[doc = "FileNotFound: File/directory not found"]
2393    MAV_FTP_ERR_FILENOTFOUND = 10,
2394}
2395impl MavFtpErr {
2396    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2397}
2398impl Default for MavFtpErr {
2399    fn default() -> Self {
2400        Self::DEFAULT
2401    }
2402}
2403#[cfg_attr(feature = "ts", derive(TS))]
2404#[cfg_attr(feature = "ts", ts(export))]
2405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2407#[cfg_attr(feature = "serde", serde(tag = "type"))]
2408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2409#[repr(u32)]
2410#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2411pub enum MavFtpOpcode {
2412    #[doc = "None. Ignored, always ACKed"]
2413    MAV_FTP_OPCODE_NONE = 0,
2414    #[doc = "TerminateSession: Terminates open Read session"]
2415    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2416    #[doc = "ResetSessions: Terminates all open read sessions"]
2417    MAV_FTP_OPCODE_RESETSESSION = 2,
2418    #[doc = "ListDirectory. List files and directories in path from offset"]
2419    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2420    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2421    MAV_FTP_OPCODE_OPENFILERO = 4,
2422    #[doc = "ReadFile: Reads size bytes from offset in session"]
2423    MAV_FTP_OPCODE_READFILE = 5,
2424    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2425    MAV_FTP_OPCODE_CREATEFILE = 6,
2426    #[doc = "WriteFile: Writes size bytes to offset in session"]
2427    MAV_FTP_OPCODE_WRITEFILE = 7,
2428    #[doc = "RemoveFile: Remove file at path"]
2429    MAV_FTP_OPCODE_REMOVEFILE = 8,
2430    #[doc = "CreateDirectory: Creates directory at path"]
2431    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2432    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2433    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2434    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2435    MAV_FTP_OPCODE_OPENFILEWO = 11,
2436    #[doc = "TruncateFile: Truncate file at path to offset length"]
2437    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2438    #[doc = "Rename: Rename path1 to path2"]
2439    MAV_FTP_OPCODE_RENAME = 13,
2440    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2441    MAV_FTP_OPCODE_CALCFILECRC = 14,
2442    #[doc = "BurstReadFile: Burst download session file"]
2443    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2444    #[doc = "ACK: ACK response"]
2445    MAV_FTP_OPCODE_ACK = 128,
2446    #[doc = "NAK: NAK response"]
2447    MAV_FTP_OPCODE_NAK = 129,
2448}
2449impl MavFtpOpcode {
2450    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2451}
2452impl Default for MavFtpOpcode {
2453    fn default() -> Self {
2454        Self::DEFAULT
2455    }
2456}
2457#[cfg_attr(feature = "ts", derive(TS))]
2458#[cfg_attr(feature = "ts", ts(export))]
2459#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2461#[cfg_attr(feature = "serde", serde(tag = "type"))]
2462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2463#[repr(u32)]
2464#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2465pub enum MavFuelType {
2466    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2467    MAV_FUEL_TYPE_UNKNOWN = 0,
2468    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2469    MAV_FUEL_TYPE_LIQUID = 1,
2470    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2471    MAV_FUEL_TYPE_GAS = 2,
2472}
2473impl MavFuelType {
2474    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2475}
2476impl Default for MavFuelType {
2477    fn default() -> Self {
2478        Self::DEFAULT
2479    }
2480}
2481bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2482impl MavGeneratorStatusFlag {
2483    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2484}
2485impl Default for MavGeneratorStatusFlag {
2486    fn default() -> Self {
2487        Self::DEFAULT
2488    }
2489}
2490#[cfg_attr(feature = "ts", derive(TS))]
2491#[cfg_attr(feature = "ts", ts(export))]
2492#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2494#[cfg_attr(feature = "serde", serde(tag = "type"))]
2495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2496#[repr(u32)]
2497#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2498pub enum MavGoto {
2499    #[doc = "Hold at the current position."]
2500    MAV_GOTO_DO_HOLD = 0,
2501    #[doc = "Continue with the next item in mission execution."]
2502    MAV_GOTO_DO_CONTINUE = 1,
2503    #[doc = "Hold at the current position of the system"]
2504    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2505    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2506    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2507}
2508impl MavGoto {
2509    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2510}
2511impl Default for MavGoto {
2512    fn default() -> Self {
2513        Self::DEFAULT
2514    }
2515}
2516#[cfg_attr(feature = "ts", derive(TS))]
2517#[cfg_attr(feature = "ts", ts(export))]
2518#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2520#[cfg_attr(feature = "serde", serde(tag = "type"))]
2521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2522#[repr(u32)]
2523#[doc = "Enumeration of landed detector states"]
2524pub enum MavLandedState {
2525    #[doc = "MAV landed state is unknown"]
2526    MAV_LANDED_STATE_UNDEFINED = 0,
2527    #[doc = "MAV is landed (on ground)"]
2528    MAV_LANDED_STATE_ON_GROUND = 1,
2529    #[doc = "MAV is in air"]
2530    MAV_LANDED_STATE_IN_AIR = 2,
2531    #[doc = "MAV currently taking off"]
2532    MAV_LANDED_STATE_TAKEOFF = 3,
2533    #[doc = "MAV currently landing"]
2534    MAV_LANDED_STATE_LANDING = 4,
2535}
2536impl MavLandedState {
2537    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2538}
2539impl Default for MavLandedState {
2540    fn default() -> Self {
2541        Self::DEFAULT
2542    }
2543}
2544#[cfg_attr(feature = "ts", derive(TS))]
2545#[cfg_attr(feature = "ts", ts(export))]
2546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2548#[cfg_attr(feature = "serde", serde(tag = "type"))]
2549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2550#[repr(u32)]
2551#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2552pub enum MavMissionResult {
2553    #[doc = "mission accepted OK"]
2554    MAV_MISSION_ACCEPTED = 0,
2555    #[doc = "Generic error / not accepting mission commands at all right now."]
2556    MAV_MISSION_ERROR = 1,
2557    #[doc = "Coordinate frame is not supported."]
2558    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2559    #[doc = "Command is not supported."]
2560    MAV_MISSION_UNSUPPORTED = 3,
2561    #[doc = "Mission items exceed storage space."]
2562    MAV_MISSION_NO_SPACE = 4,
2563    #[doc = "One of the parameters has an invalid value."]
2564    MAV_MISSION_INVALID = 5,
2565    #[doc = "param1 has an invalid value."]
2566    MAV_MISSION_INVALID_PARAM1 = 6,
2567    #[doc = "param2 has an invalid value."]
2568    MAV_MISSION_INVALID_PARAM2 = 7,
2569    #[doc = "param3 has an invalid value."]
2570    MAV_MISSION_INVALID_PARAM3 = 8,
2571    #[doc = "param4 has an invalid value."]
2572    MAV_MISSION_INVALID_PARAM4 = 9,
2573    #[doc = "x / param5 has an invalid value."]
2574    MAV_MISSION_INVALID_PARAM5_X = 10,
2575    #[doc = "y / param6 has an invalid value."]
2576    MAV_MISSION_INVALID_PARAM6_Y = 11,
2577    #[doc = "z / param7 has an invalid value."]
2578    MAV_MISSION_INVALID_PARAM7 = 12,
2579    #[doc = "Mission item received out of sequence"]
2580    MAV_MISSION_INVALID_SEQUENCE = 13,
2581    #[doc = "Not accepting any mission commands from this communication partner."]
2582    MAV_MISSION_DENIED = 14,
2583    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2584    MAV_MISSION_OPERATION_CANCELLED = 15,
2585}
2586impl MavMissionResult {
2587    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2588}
2589impl Default for MavMissionResult {
2590    fn default() -> Self {
2591        Self::DEFAULT
2592    }
2593}
2594#[cfg_attr(feature = "ts", derive(TS))]
2595#[cfg_attr(feature = "ts", ts(export))]
2596#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2598#[cfg_attr(feature = "serde", serde(tag = "type"))]
2599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2600#[repr(u32)]
2601#[doc = "Type of mission items being requested/sent in mission protocol."]
2602pub enum MavMissionType {
2603    #[doc = "Items are mission commands for main mission."]
2604    MAV_MISSION_TYPE_MISSION = 0,
2605    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2606    MAV_MISSION_TYPE_FENCE = 1,
2607    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2608    MAV_MISSION_TYPE_RALLY = 2,
2609    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2610    MAV_MISSION_TYPE_ALL = 255,
2611}
2612impl MavMissionType {
2613    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2614}
2615impl Default for MavMissionType {
2616    fn default() -> Self {
2617        Self::DEFAULT
2618    }
2619}
2620#[cfg_attr(feature = "ts", derive(TS))]
2621#[cfg_attr(feature = "ts", ts(export))]
2622#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2624#[cfg_attr(feature = "serde", serde(tag = "type"))]
2625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2626#[repr(u32)]
2627#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2628pub enum MavMode {
2629    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2630    MAV_MODE_PREFLIGHT = 0,
2631    #[doc = "System is allowed to be active, under assisted RC control."]
2632    MAV_MODE_STABILIZE_DISARMED = 80,
2633    #[doc = "System is allowed to be active, under assisted RC control."]
2634    MAV_MODE_STABILIZE_ARMED = 208,
2635    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2636    MAV_MODE_MANUAL_DISARMED = 64,
2637    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2638    MAV_MODE_MANUAL_ARMED = 192,
2639    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2640    MAV_MODE_GUIDED_DISARMED = 88,
2641    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2642    MAV_MODE_GUIDED_ARMED = 216,
2643    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2644    MAV_MODE_AUTO_DISARMED = 92,
2645    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2646    MAV_MODE_AUTO_ARMED = 220,
2647    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2648    MAV_MODE_TEST_DISARMED = 66,
2649    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2650    MAV_MODE_TEST_ARMED = 194,
2651}
2652impl MavMode {
2653    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2654}
2655impl Default for MavMode {
2656    fn default() -> Self {
2657        Self::DEFAULT
2658    }
2659}
2660bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2661impl MavModeFlag {
2662    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2663}
2664impl Default for MavModeFlag {
2665    fn default() -> Self {
2666        Self::DEFAULT
2667    }
2668}
2669#[cfg_attr(feature = "ts", derive(TS))]
2670#[cfg_attr(feature = "ts", ts(export))]
2671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2673#[cfg_attr(feature = "serde", serde(tag = "type"))]
2674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2675#[repr(u32)]
2676#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2677pub enum MavModeFlagDecodePosition {
2678    #[doc = "First bit:  10000000"]
2679    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2680    #[doc = "Second bit: 01000000"]
2681    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2682    #[doc = "Third bit:  00100000"]
2683    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2684    #[doc = "Fourth bit: 00010000"]
2685    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2686    #[doc = "Fifth bit:  00001000"]
2687    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2688    #[doc = "Sixth bit:   00000100"]
2689    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2690    #[doc = "Seventh bit: 00000010"]
2691    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2692    #[doc = "Eighth bit: 00000001"]
2693    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2694}
2695impl MavModeFlagDecodePosition {
2696    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2697}
2698impl Default for MavModeFlagDecodePosition {
2699    fn default() -> Self {
2700        Self::DEFAULT
2701    }
2702}
2703bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2704impl MavModeProperty {
2705    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2706}
2707impl Default for MavModeProperty {
2708    fn default() -> Self {
2709        Self::DEFAULT
2710    }
2711}
2712#[cfg_attr(feature = "ts", derive(TS))]
2713#[cfg_attr(feature = "ts", ts(export))]
2714#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2716#[cfg_attr(feature = "serde", serde(tag = "type"))]
2717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2718#[repr(u32)]
2719#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2720#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2721pub enum MavMountMode {
2722    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2723    MAV_MOUNT_MODE_RETRACT = 0,
2724    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2725    MAV_MOUNT_MODE_NEUTRAL = 1,
2726    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2727    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2728    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2729    MAV_MOUNT_MODE_RC_TARGETING = 3,
2730    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2731    MAV_MOUNT_MODE_GPS_POINT = 4,
2732    #[doc = "Gimbal tracks system with specified system ID"]
2733    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2734    #[doc = "Gimbal tracks home position"]
2735    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2736}
2737impl MavMountMode {
2738    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2739}
2740impl Default for MavMountMode {
2741    fn default() -> Self {
2742        Self::DEFAULT
2743    }
2744}
2745#[cfg_attr(feature = "ts", derive(TS))]
2746#[cfg_attr(feature = "ts", ts(export))]
2747#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2749#[cfg_attr(feature = "serde", serde(tag = "type"))]
2750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2751#[repr(u32)]
2752pub enum MavOdidArmStatus {
2753    #[doc = "Passing arming checks."]
2754    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2755    #[doc = "Generic arming failure, see error string for details."]
2756    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2757}
2758impl MavOdidArmStatus {
2759    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2760}
2761impl Default for MavOdidArmStatus {
2762    fn default() -> Self {
2763        Self::DEFAULT
2764    }
2765}
2766#[cfg_attr(feature = "ts", derive(TS))]
2767#[cfg_attr(feature = "ts", ts(export))]
2768#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2770#[cfg_attr(feature = "serde", serde(tag = "type"))]
2771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2772#[repr(u32)]
2773pub enum MavOdidAuthType {
2774    #[doc = "No authentication type is specified."]
2775    MAV_ODID_AUTH_TYPE_NONE = 0,
2776    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2777    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2778    #[doc = "Signature for the Operator ID."]
2779    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2780    #[doc = "Signature for the entire message set."]
2781    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2782    #[doc = "Authentication is provided by Network Remote ID."]
2783    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2784    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2785    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2786}
2787impl MavOdidAuthType {
2788    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2789}
2790impl Default for MavOdidAuthType {
2791    fn default() -> Self {
2792        Self::DEFAULT
2793    }
2794}
2795#[cfg_attr(feature = "ts", derive(TS))]
2796#[cfg_attr(feature = "ts", ts(export))]
2797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2799#[cfg_attr(feature = "serde", serde(tag = "type"))]
2800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2801#[repr(u32)]
2802pub enum MavOdidCategoryEu {
2803    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2804    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2805    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2806    MAV_ODID_CATEGORY_EU_OPEN = 1,
2807    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2808    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2809    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2810    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2811}
2812impl MavOdidCategoryEu {
2813    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2814}
2815impl Default for MavOdidCategoryEu {
2816    fn default() -> Self {
2817        Self::DEFAULT
2818    }
2819}
2820#[cfg_attr(feature = "ts", derive(TS))]
2821#[cfg_attr(feature = "ts", ts(export))]
2822#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2824#[cfg_attr(feature = "serde", serde(tag = "type"))]
2825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2826#[repr(u32)]
2827pub enum MavOdidClassEu {
2828    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2829    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2830    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2831    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2832    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2833    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2834    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2835    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2836    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2837    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2838    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2839    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2840    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2841    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2842    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2843    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2844}
2845impl MavOdidClassEu {
2846    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2847}
2848impl Default for MavOdidClassEu {
2849    fn default() -> Self {
2850        Self::DEFAULT
2851    }
2852}
2853#[cfg_attr(feature = "ts", derive(TS))]
2854#[cfg_attr(feature = "ts", ts(export))]
2855#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2857#[cfg_attr(feature = "serde", serde(tag = "type"))]
2858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2859#[repr(u32)]
2860pub enum MavOdidClassificationType {
2861    #[doc = "The classification type for the UA is undeclared."]
2862    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2863    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2864    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2865}
2866impl MavOdidClassificationType {
2867    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2868}
2869impl Default for MavOdidClassificationType {
2870    fn default() -> Self {
2871        Self::DEFAULT
2872    }
2873}
2874#[cfg_attr(feature = "ts", derive(TS))]
2875#[cfg_attr(feature = "ts", ts(export))]
2876#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2878#[cfg_attr(feature = "serde", serde(tag = "type"))]
2879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2880#[repr(u32)]
2881pub enum MavOdidDescType {
2882    #[doc = "Optional free-form text description of the purpose of the flight."]
2883    MAV_ODID_DESC_TYPE_TEXT = 0,
2884    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2885    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2886    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2887    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2888}
2889impl MavOdidDescType {
2890    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2891}
2892impl Default for MavOdidDescType {
2893    fn default() -> Self {
2894        Self::DEFAULT
2895    }
2896}
2897#[cfg_attr(feature = "ts", derive(TS))]
2898#[cfg_attr(feature = "ts", ts(export))]
2899#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2901#[cfg_attr(feature = "serde", serde(tag = "type"))]
2902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2903#[repr(u32)]
2904pub enum MavOdidHeightRef {
2905    #[doc = "The height field is relative to the take-off location."]
2906    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2907    #[doc = "The height field is relative to ground."]
2908    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2909}
2910impl MavOdidHeightRef {
2911    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2912}
2913impl Default for MavOdidHeightRef {
2914    fn default() -> Self {
2915        Self::DEFAULT
2916    }
2917}
2918#[cfg_attr(feature = "ts", derive(TS))]
2919#[cfg_attr(feature = "ts", ts(export))]
2920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2922#[cfg_attr(feature = "serde", serde(tag = "type"))]
2923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2924#[repr(u32)]
2925pub enum MavOdidHorAcc {
2926    #[doc = "The horizontal accuracy is unknown."]
2927    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2928    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2929    MAV_ODID_HOR_ACC_10NM = 1,
2930    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2931    MAV_ODID_HOR_ACC_4NM = 2,
2932    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2933    MAV_ODID_HOR_ACC_2NM = 3,
2934    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2935    MAV_ODID_HOR_ACC_1NM = 4,
2936    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2937    MAV_ODID_HOR_ACC_0_5NM = 5,
2938    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2939    MAV_ODID_HOR_ACC_0_3NM = 6,
2940    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2941    MAV_ODID_HOR_ACC_0_1NM = 7,
2942    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2943    MAV_ODID_HOR_ACC_0_05NM = 8,
2944    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2945    MAV_ODID_HOR_ACC_30_METER = 9,
2946    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2947    MAV_ODID_HOR_ACC_10_METER = 10,
2948    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2949    MAV_ODID_HOR_ACC_3_METER = 11,
2950    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2951    MAV_ODID_HOR_ACC_1_METER = 12,
2952}
2953impl MavOdidHorAcc {
2954    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2955}
2956impl Default for MavOdidHorAcc {
2957    fn default() -> Self {
2958        Self::DEFAULT
2959    }
2960}
2961#[cfg_attr(feature = "ts", derive(TS))]
2962#[cfg_attr(feature = "ts", ts(export))]
2963#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2965#[cfg_attr(feature = "serde", serde(tag = "type"))]
2966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2967#[repr(u32)]
2968pub enum MavOdidIdType {
2969    #[doc = "No type defined."]
2970    MAV_ODID_ID_TYPE_NONE = 0,
2971    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2972    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2973    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2974    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2975    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2976    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2977    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2978    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2979}
2980impl MavOdidIdType {
2981    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2982}
2983impl Default for MavOdidIdType {
2984    fn default() -> Self {
2985        Self::DEFAULT
2986    }
2987}
2988#[cfg_attr(feature = "ts", derive(TS))]
2989#[cfg_attr(feature = "ts", ts(export))]
2990#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2992#[cfg_attr(feature = "serde", serde(tag = "type"))]
2993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2994#[repr(u32)]
2995pub enum MavOdidOperatorIdType {
2996    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2997    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2998}
2999impl MavOdidOperatorIdType {
3000    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3001}
3002impl Default for MavOdidOperatorIdType {
3003    fn default() -> Self {
3004        Self::DEFAULT
3005    }
3006}
3007#[cfg_attr(feature = "ts", derive(TS))]
3008#[cfg_attr(feature = "ts", ts(export))]
3009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3011#[cfg_attr(feature = "serde", serde(tag = "type"))]
3012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3013#[repr(u32)]
3014pub enum MavOdidOperatorLocationType {
3015    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3016    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3017    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3018    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3019    #[doc = "The location/altitude of the operator are fixed values."]
3020    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3021}
3022impl MavOdidOperatorLocationType {
3023    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3024}
3025impl Default for MavOdidOperatorLocationType {
3026    fn default() -> Self {
3027        Self::DEFAULT
3028    }
3029}
3030#[cfg_attr(feature = "ts", derive(TS))]
3031#[cfg_attr(feature = "ts", ts(export))]
3032#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3034#[cfg_attr(feature = "serde", serde(tag = "type"))]
3035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3036#[repr(u32)]
3037pub enum MavOdidSpeedAcc {
3038    #[doc = "The speed accuracy is unknown."]
3039    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3040    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3041    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3042    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3043    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3044    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3045    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3046    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3047    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3048}
3049impl MavOdidSpeedAcc {
3050    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3051}
3052impl Default for MavOdidSpeedAcc {
3053    fn default() -> Self {
3054        Self::DEFAULT
3055    }
3056}
3057#[cfg_attr(feature = "ts", derive(TS))]
3058#[cfg_attr(feature = "ts", ts(export))]
3059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3061#[cfg_attr(feature = "serde", serde(tag = "type"))]
3062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3063#[repr(u32)]
3064pub enum MavOdidStatus {
3065    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3066    MAV_ODID_STATUS_UNDECLARED = 0,
3067    #[doc = "The UA is on the ground."]
3068    MAV_ODID_STATUS_GROUND = 1,
3069    #[doc = "The UA is in the air."]
3070    MAV_ODID_STATUS_AIRBORNE = 2,
3071    #[doc = "The UA is having an emergency."]
3072    MAV_ODID_STATUS_EMERGENCY = 3,
3073    #[doc = "The remote ID system is failing or unreliable in some way."]
3074    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3075}
3076impl MavOdidStatus {
3077    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3078}
3079impl Default for MavOdidStatus {
3080    fn default() -> Self {
3081        Self::DEFAULT
3082    }
3083}
3084#[cfg_attr(feature = "ts", derive(TS))]
3085#[cfg_attr(feature = "ts", ts(export))]
3086#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3088#[cfg_attr(feature = "serde", serde(tag = "type"))]
3089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3090#[repr(u32)]
3091pub enum MavOdidTimeAcc {
3092    #[doc = "The timestamp accuracy is unknown."]
3093    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3094    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3095    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3096    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3097    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3098    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3099    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3100    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3101    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3102    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3103    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3104    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3105    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3106    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3107    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3108    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3109    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3110    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3111    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3112    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3113    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3114    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3115    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3116    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3117    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3118    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3119    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3120    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3121    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3122    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3123    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3124}
3125impl MavOdidTimeAcc {
3126    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3127}
3128impl Default for MavOdidTimeAcc {
3129    fn default() -> Self {
3130        Self::DEFAULT
3131    }
3132}
3133#[cfg_attr(feature = "ts", derive(TS))]
3134#[cfg_attr(feature = "ts", ts(export))]
3135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3137#[cfg_attr(feature = "serde", serde(tag = "type"))]
3138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3139#[repr(u32)]
3140pub enum MavOdidUaType {
3141    #[doc = "No UA (Unmanned Aircraft) type defined."]
3142    MAV_ODID_UA_TYPE_NONE = 0,
3143    #[doc = "Aeroplane/Airplane. Fixed wing."]
3144    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3145    #[doc = "Helicopter or multirotor."]
3146    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3147    #[doc = "Gyroplane."]
3148    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3149    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3150    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3151    #[doc = "Ornithopter."]
3152    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3153    #[doc = "Glider."]
3154    MAV_ODID_UA_TYPE_GLIDER = 6,
3155    #[doc = "Kite."]
3156    MAV_ODID_UA_TYPE_KITE = 7,
3157    #[doc = "Free Balloon."]
3158    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3159    #[doc = "Captive Balloon."]
3160    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3161    #[doc = "Airship. E.g. a blimp."]
3162    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3163    #[doc = "Free Fall/Parachute (unpowered)."]
3164    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3165    #[doc = "Rocket."]
3166    MAV_ODID_UA_TYPE_ROCKET = 12,
3167    #[doc = "Tethered powered aircraft."]
3168    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3169    #[doc = "Ground Obstacle."]
3170    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3171    #[doc = "Other type of aircraft not listed earlier."]
3172    MAV_ODID_UA_TYPE_OTHER = 15,
3173}
3174impl MavOdidUaType {
3175    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3176}
3177impl Default for MavOdidUaType {
3178    fn default() -> Self {
3179        Self::DEFAULT
3180    }
3181}
3182#[cfg_attr(feature = "ts", derive(TS))]
3183#[cfg_attr(feature = "ts", ts(export))]
3184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3186#[cfg_attr(feature = "serde", serde(tag = "type"))]
3187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3188#[repr(u32)]
3189pub enum MavOdidVerAcc {
3190    #[doc = "The vertical accuracy is unknown."]
3191    MAV_ODID_VER_ACC_UNKNOWN = 0,
3192    #[doc = "The vertical accuracy is smaller than 150 meter."]
3193    MAV_ODID_VER_ACC_150_METER = 1,
3194    #[doc = "The vertical accuracy is smaller than 45 meter."]
3195    MAV_ODID_VER_ACC_45_METER = 2,
3196    #[doc = "The vertical accuracy is smaller than 25 meter."]
3197    MAV_ODID_VER_ACC_25_METER = 3,
3198    #[doc = "The vertical accuracy is smaller than 10 meter."]
3199    MAV_ODID_VER_ACC_10_METER = 4,
3200    #[doc = "The vertical accuracy is smaller than 3 meter."]
3201    MAV_ODID_VER_ACC_3_METER = 5,
3202    #[doc = "The vertical accuracy is smaller than 1 meter."]
3203    MAV_ODID_VER_ACC_1_METER = 6,
3204}
3205impl MavOdidVerAcc {
3206    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3207}
3208impl Default for MavOdidVerAcc {
3209    fn default() -> Self {
3210        Self::DEFAULT
3211    }
3212}
3213#[cfg_attr(feature = "ts", derive(TS))]
3214#[cfg_attr(feature = "ts", ts(export))]
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3221pub enum MavParamExtType {
3222    #[doc = "8-bit unsigned integer"]
3223    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3224    #[doc = "8-bit signed integer"]
3225    MAV_PARAM_EXT_TYPE_INT8 = 2,
3226    #[doc = "16-bit unsigned integer"]
3227    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3228    #[doc = "16-bit signed integer"]
3229    MAV_PARAM_EXT_TYPE_INT16 = 4,
3230    #[doc = "32-bit unsigned integer"]
3231    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3232    #[doc = "32-bit signed integer"]
3233    MAV_PARAM_EXT_TYPE_INT32 = 6,
3234    #[doc = "64-bit unsigned integer"]
3235    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3236    #[doc = "64-bit signed integer"]
3237    MAV_PARAM_EXT_TYPE_INT64 = 8,
3238    #[doc = "32-bit floating-point"]
3239    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3240    #[doc = "64-bit floating-point"]
3241    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3242    #[doc = "Custom Type"]
3243    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3244}
3245impl MavParamExtType {
3246    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3247}
3248impl Default for MavParamExtType {
3249    fn default() -> Self {
3250        Self::DEFAULT
3251    }
3252}
3253#[cfg_attr(feature = "ts", derive(TS))]
3254#[cfg_attr(feature = "ts", ts(export))]
3255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3257#[cfg_attr(feature = "serde", serde(tag = "type"))]
3258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3259#[repr(u32)]
3260#[doc = "Specifies the datatype of a MAVLink parameter."]
3261pub enum MavParamType {
3262    #[doc = "8-bit unsigned integer"]
3263    MAV_PARAM_TYPE_UINT8 = 1,
3264    #[doc = "8-bit signed integer"]
3265    MAV_PARAM_TYPE_INT8 = 2,
3266    #[doc = "16-bit unsigned integer"]
3267    MAV_PARAM_TYPE_UINT16 = 3,
3268    #[doc = "16-bit signed integer"]
3269    MAV_PARAM_TYPE_INT16 = 4,
3270    #[doc = "32-bit unsigned integer"]
3271    MAV_PARAM_TYPE_UINT32 = 5,
3272    #[doc = "32-bit signed integer"]
3273    MAV_PARAM_TYPE_INT32 = 6,
3274    #[doc = "64-bit unsigned integer"]
3275    MAV_PARAM_TYPE_UINT64 = 7,
3276    #[doc = "64-bit signed integer"]
3277    MAV_PARAM_TYPE_INT64 = 8,
3278    #[doc = "32-bit floating-point"]
3279    MAV_PARAM_TYPE_REAL32 = 9,
3280    #[doc = "64-bit floating-point"]
3281    MAV_PARAM_TYPE_REAL64 = 10,
3282}
3283impl MavParamType {
3284    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3285}
3286impl Default for MavParamType {
3287    fn default() -> Self {
3288        Self::DEFAULT
3289    }
3290}
3291bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3292impl MavPowerStatus {
3293    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3294}
3295impl Default for MavPowerStatus {
3296    fn default() -> Self {
3297        Self::DEFAULT
3298    }
3299}
3300bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3301impl MavProtocolCapability {
3302    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3303}
3304impl Default for MavProtocolCapability {
3305    fn default() -> Self {
3306        Self::DEFAULT
3307    }
3308}
3309#[cfg_attr(feature = "ts", derive(TS))]
3310#[cfg_attr(feature = "ts", ts(export))]
3311#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3313#[cfg_attr(feature = "serde", serde(tag = "type"))]
3314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3315#[repr(u32)]
3316#[doc = "Result from a MAVLink command (MAV_CMD)"]
3317pub enum MavResult {
3318    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3319    MAV_RESULT_ACCEPTED = 0,
3320    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3321    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3322    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3323    MAV_RESULT_DENIED = 2,
3324    #[doc = "Command is not supported (unknown)."]
3325    MAV_RESULT_UNSUPPORTED = 3,
3326    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3327    MAV_RESULT_FAILED = 4,
3328    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3329    MAV_RESULT_IN_PROGRESS = 5,
3330    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3331    MAV_RESULT_CANCELLED = 6,
3332    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3333    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3334    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3335    MAV_RESULT_COMMAND_INT_ONLY = 8,
3336    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3337    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3338}
3339impl MavResult {
3340    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3341}
3342impl Default for MavResult {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[cfg_attr(feature = "ts", derive(TS))]
3348#[cfg_attr(feature = "ts", ts(export))]
3349#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3351#[cfg_attr(feature = "serde", serde(tag = "type"))]
3352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3353#[repr(u32)]
3354#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3355#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3356pub enum MavRoi {
3357    #[doc = "No region of interest."]
3358    MAV_ROI_NONE = 0,
3359    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3360    MAV_ROI_WPNEXT = 1,
3361    #[doc = "Point toward given waypoint."]
3362    MAV_ROI_WPINDEX = 2,
3363    #[doc = "Point toward fixed location."]
3364    MAV_ROI_LOCATION = 3,
3365    #[doc = "Point toward of given id."]
3366    MAV_ROI_TARGET = 4,
3367}
3368impl MavRoi {
3369    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3370}
3371impl Default for MavRoi {
3372    fn default() -> Self {
3373        Self::DEFAULT
3374    }
3375}
3376#[cfg_attr(feature = "ts", derive(TS))]
3377#[cfg_attr(feature = "ts", ts(export))]
3378#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3380#[cfg_attr(feature = "serde", serde(tag = "type"))]
3381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3382#[repr(u32)]
3383#[doc = "Enumeration of sensor orientation, according to its rotations"]
3384pub enum MavSensorOrientation {
3385    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3386    MAV_SENSOR_ROTATION_NONE = 0,
3387    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3388    MAV_SENSOR_ROTATION_YAW_45 = 1,
3389    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3390    MAV_SENSOR_ROTATION_YAW_90 = 2,
3391    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3392    MAV_SENSOR_ROTATION_YAW_135 = 3,
3393    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3394    MAV_SENSOR_ROTATION_YAW_180 = 4,
3395    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3396    MAV_SENSOR_ROTATION_YAW_225 = 5,
3397    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3398    MAV_SENSOR_ROTATION_YAW_270 = 6,
3399    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3400    MAV_SENSOR_ROTATION_YAW_315 = 7,
3401    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3402    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3403    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3404    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3405    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3406    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3407    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3408    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3409    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3410    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3411    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3412    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3413    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3414    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3415    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3416    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3417    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3418    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3419    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3420    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3421    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3422    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3423    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3424    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3425    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3426    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3427    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3428    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3429    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3430    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3431    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3432    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3433    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3434    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3435    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3436    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3437    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3438    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3439    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3440    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3441    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3442    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3443    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3444    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3445    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3446    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3447    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3448    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3449    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3450    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3451    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3452    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3453    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3454    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3455    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3456    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3457    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3458    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3459    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3460    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3461    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3462    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3463    #[doc = "Pitch: 315"]
3464    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3465    #[doc = "Roll: 90, Pitch: 315"]
3466    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3467    #[doc = "Custom orientation"]
3468    MAV_SENSOR_ROTATION_CUSTOM = 100,
3469}
3470impl MavSensorOrientation {
3471    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3472}
3473impl Default for MavSensorOrientation {
3474    fn default() -> Self {
3475        Self::DEFAULT
3476    }
3477}
3478#[cfg_attr(feature = "ts", derive(TS))]
3479#[cfg_attr(feature = "ts", ts(export))]
3480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3482#[cfg_attr(feature = "serde", serde(tag = "type"))]
3483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3484#[repr(u32)]
3485#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3486pub enum MavSeverity {
3487    #[doc = "System is unusable. This is a \"panic\" condition."]
3488    MAV_SEVERITY_EMERGENCY = 0,
3489    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3490    MAV_SEVERITY_ALERT = 1,
3491    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3492    MAV_SEVERITY_CRITICAL = 2,
3493    #[doc = "Indicates an error in secondary/redundant systems."]
3494    MAV_SEVERITY_ERROR = 3,
3495    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3496    MAV_SEVERITY_WARNING = 4,
3497    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3498    MAV_SEVERITY_NOTICE = 5,
3499    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3500    MAV_SEVERITY_INFO = 6,
3501    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3502    MAV_SEVERITY_DEBUG = 7,
3503}
3504impl MavSeverity {
3505    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3506}
3507impl Default for MavSeverity {
3508    fn default() -> Self {
3509        Self::DEFAULT
3510    }
3511}
3512#[cfg_attr(feature = "ts", derive(TS))]
3513#[cfg_attr(feature = "ts", ts(export))]
3514#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3516#[cfg_attr(feature = "serde", serde(tag = "type"))]
3517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3518#[repr(u32)]
3519#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3520pub enum MavStandardMode {
3521    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3522    MAV_STANDARD_MODE_NON_STANDARD = 0,
3523    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3524    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3525    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3526    MAV_STANDARD_MODE_ORBIT = 2,
3527    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3528    MAV_STANDARD_MODE_CRUISE = 3,
3529    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3530    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3531    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3532    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3533    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3534    MAV_STANDARD_MODE_MISSION = 6,
3535    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3536    MAV_STANDARD_MODE_LAND = 7,
3537    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3538    MAV_STANDARD_MODE_TAKEOFF = 8,
3539}
3540impl MavStandardMode {
3541    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3542}
3543impl Default for MavStandardMode {
3544    fn default() -> Self {
3545        Self::DEFAULT
3546    }
3547}
3548#[cfg_attr(feature = "ts", derive(TS))]
3549#[cfg_attr(feature = "ts", ts(export))]
3550#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3552#[cfg_attr(feature = "serde", serde(tag = "type"))]
3553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3554#[repr(u32)]
3555pub enum MavState {
3556    #[doc = "Uninitialized system, state is unknown."]
3557    MAV_STATE_UNINIT = 0,
3558    #[doc = "System is booting up."]
3559    MAV_STATE_BOOT = 1,
3560    #[doc = "System is calibrating and not flight-ready."]
3561    MAV_STATE_CALIBRATING = 2,
3562    #[doc = "System is grounded and on standby. It can be launched any time."]
3563    MAV_STATE_STANDBY = 3,
3564    #[doc = "System is active and might be already airborne. Motors are engaged."]
3565    MAV_STATE_ACTIVE = 4,
3566    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3567    MAV_STATE_CRITICAL = 5,
3568    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3569    MAV_STATE_EMERGENCY = 6,
3570    #[doc = "System just initialized its power-down sequence, will shut down now."]
3571    MAV_STATE_POWEROFF = 7,
3572    #[doc = "System is terminating itself (failsafe or commanded)."]
3573    MAV_STATE_FLIGHT_TERMINATION = 8,
3574}
3575impl MavState {
3576    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3577}
3578impl Default for MavState {
3579    fn default() -> Self {
3580        Self::DEFAULT
3581    }
3582}
3583bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3584impl MavSysStatusSensor {
3585    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3586}
3587impl Default for MavSysStatusSensor {
3588    fn default() -> Self {
3589        Self::DEFAULT
3590    }
3591}
3592bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3593impl MavSysStatusSensorExtended {
3594    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3595}
3596impl Default for MavSysStatusSensorExtended {
3597    fn default() -> Self {
3598        Self::DEFAULT
3599    }
3600}
3601#[cfg_attr(feature = "ts", derive(TS))]
3602#[cfg_attr(feature = "ts", ts(export))]
3603#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3605#[cfg_attr(feature = "serde", serde(tag = "type"))]
3606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3607#[repr(u32)]
3608pub enum MavTunnelPayloadType {
3609    #[doc = "Encoding of payload unknown."]
3610    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3611    #[doc = "Registered for STorM32 gimbal controller."]
3612    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3613    #[doc = "Registered for STorM32 gimbal controller."]
3614    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3615    #[doc = "Registered for STorM32 gimbal controller."]
3616    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3617    #[doc = "Registered for STorM32 gimbal controller."]
3618    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3619    #[doc = "Registered for STorM32 gimbal controller."]
3620    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3621    #[doc = "Registered for STorM32 gimbal controller."]
3622    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3623    #[doc = "Registered for STorM32 gimbal controller."]
3624    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3625    #[doc = "Registered for STorM32 gimbal controller."]
3626    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3627    #[doc = "Registered for STorM32 gimbal controller."]
3628    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3629    #[doc = "Registered for STorM32 gimbal controller."]
3630    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3631    #[doc = "Registered for ModalAI remote OSD protocol."]
3632    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3633    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3634    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3635    #[doc = "Registered for ModalAI vendor use."]
3636    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3637}
3638impl MavTunnelPayloadType {
3639    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3640}
3641impl Default for MavTunnelPayloadType {
3642    fn default() -> Self {
3643        Self::DEFAULT
3644    }
3645}
3646#[cfg_attr(feature = "ts", derive(TS))]
3647#[cfg_attr(feature = "ts", ts(export))]
3648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3650#[cfg_attr(feature = "serde", serde(tag = "type"))]
3651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3652#[repr(u32)]
3653#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3654pub enum MavType {
3655    #[doc = "Generic micro air vehicle"]
3656    MAV_TYPE_GENERIC = 0,
3657    #[doc = "Fixed wing aircraft."]
3658    MAV_TYPE_FIXED_WING = 1,
3659    #[doc = "Quadrotor"]
3660    MAV_TYPE_QUADROTOR = 2,
3661    #[doc = "Coaxial helicopter"]
3662    MAV_TYPE_COAXIAL = 3,
3663    #[doc = "Normal helicopter with tail rotor."]
3664    MAV_TYPE_HELICOPTER = 4,
3665    #[doc = "Ground installation"]
3666    MAV_TYPE_ANTENNA_TRACKER = 5,
3667    #[doc = "Operator control unit / ground control station"]
3668    MAV_TYPE_GCS = 6,
3669    #[doc = "Airship, controlled"]
3670    MAV_TYPE_AIRSHIP = 7,
3671    #[doc = "Free balloon, uncontrolled"]
3672    MAV_TYPE_FREE_BALLOON = 8,
3673    #[doc = "Rocket"]
3674    MAV_TYPE_ROCKET = 9,
3675    #[doc = "Ground rover"]
3676    MAV_TYPE_GROUND_ROVER = 10,
3677    #[doc = "Surface vessel, boat, ship"]
3678    MAV_TYPE_SURFACE_BOAT = 11,
3679    #[doc = "Submarine"]
3680    MAV_TYPE_SUBMARINE = 12,
3681    #[doc = "Hexarotor"]
3682    MAV_TYPE_HEXAROTOR = 13,
3683    #[doc = "Octorotor"]
3684    MAV_TYPE_OCTOROTOR = 14,
3685    #[doc = "Tricopter"]
3686    MAV_TYPE_TRICOPTER = 15,
3687    #[doc = "Flapping wing"]
3688    MAV_TYPE_FLAPPING_WING = 16,
3689    #[doc = "Kite"]
3690    MAV_TYPE_KITE = 17,
3691    #[doc = "Onboard companion controller"]
3692    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3693    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3694    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3695    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3696    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3697    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3698    MAV_TYPE_VTOL_TILTROTOR = 21,
3699    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3700    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3701    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3702    MAV_TYPE_VTOL_TAILSITTER = 23,
3703    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3704    MAV_TYPE_VTOL_TILTWING = 24,
3705    #[doc = "VTOL reserved 5"]
3706    MAV_TYPE_VTOL_RESERVED5 = 25,
3707    #[doc = "Gimbal"]
3708    MAV_TYPE_GIMBAL = 26,
3709    #[doc = "ADSB system"]
3710    MAV_TYPE_ADSB = 27,
3711    #[doc = "Steerable, nonrigid airfoil"]
3712    MAV_TYPE_PARAFOIL = 28,
3713    #[doc = "Dodecarotor"]
3714    MAV_TYPE_DODECAROTOR = 29,
3715    #[doc = "Camera"]
3716    MAV_TYPE_CAMERA = 30,
3717    #[doc = "Charging station"]
3718    MAV_TYPE_CHARGING_STATION = 31,
3719    #[doc = "FLARM collision avoidance system"]
3720    MAV_TYPE_FLARM = 32,
3721    #[doc = "Servo"]
3722    MAV_TYPE_SERVO = 33,
3723    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3724    MAV_TYPE_ODID = 34,
3725    #[doc = "Decarotor"]
3726    MAV_TYPE_DECAROTOR = 35,
3727    #[doc = "Battery"]
3728    MAV_TYPE_BATTERY = 36,
3729    #[doc = "Parachute"]
3730    MAV_TYPE_PARACHUTE = 37,
3731    #[doc = "Log"]
3732    MAV_TYPE_LOG = 38,
3733    #[doc = "OSD"]
3734    MAV_TYPE_OSD = 39,
3735    #[doc = "IMU"]
3736    MAV_TYPE_IMU = 40,
3737    #[doc = "GPS"]
3738    MAV_TYPE_GPS = 41,
3739    #[doc = "Winch"]
3740    MAV_TYPE_WINCH = 42,
3741    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3742    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3743    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3744    MAV_TYPE_ILLUMINATOR = 44,
3745    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3746    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3747}
3748impl MavType {
3749    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3750}
3751impl Default for MavType {
3752    fn default() -> Self {
3753        Self::DEFAULT
3754    }
3755}
3756#[cfg_attr(feature = "ts", derive(TS))]
3757#[cfg_attr(feature = "ts", ts(export))]
3758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3760#[cfg_attr(feature = "serde", serde(tag = "type"))]
3761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3762#[repr(u32)]
3763#[doc = "Enumeration of VTOL states"]
3764pub enum MavVtolState {
3765    #[doc = "MAV is not configured as VTOL"]
3766    MAV_VTOL_STATE_UNDEFINED = 0,
3767    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3768    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3769    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3770    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3771    #[doc = "VTOL is in multicopter state"]
3772    MAV_VTOL_STATE_MC = 3,
3773    #[doc = "VTOL is in fixed-wing state"]
3774    MAV_VTOL_STATE_FW = 4,
3775}
3776impl MavVtolState {
3777    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3778}
3779impl Default for MavVtolState {
3780    fn default() -> Self {
3781        Self::DEFAULT
3782    }
3783}
3784bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3785impl MavWinchStatusFlag {
3786    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3787}
3788impl Default for MavWinchStatusFlag {
3789    fn default() -> Self {
3790        Self::DEFAULT
3791    }
3792}
3793#[cfg_attr(feature = "ts", derive(TS))]
3794#[cfg_attr(feature = "ts", ts(export))]
3795#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3797#[cfg_attr(feature = "serde", serde(tag = "type"))]
3798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3799#[repr(u32)]
3800pub enum MavlinkDataStreamType {
3801    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3802    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3803    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3804    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3805    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3806    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3807}
3808impl MavlinkDataStreamType {
3809    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3810}
3811impl Default for MavlinkDataStreamType {
3812    fn default() -> Self {
3813        Self::DEFAULT
3814    }
3815}
3816#[cfg_attr(feature = "ts", derive(TS))]
3817#[cfg_attr(feature = "ts", ts(export))]
3818#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3820#[cfg_attr(feature = "serde", serde(tag = "type"))]
3821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3822#[repr(u32)]
3823#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3824pub enum MissionState {
3825    #[doc = "The mission status reporting is not supported."]
3826    MISSION_STATE_UNKNOWN = 0,
3827    #[doc = "No mission on the vehicle."]
3828    MISSION_STATE_NO_MISSION = 1,
3829    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3830    MISSION_STATE_NOT_STARTED = 2,
3831    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3832    MISSION_STATE_ACTIVE = 3,
3833    #[doc = "Mission is paused when in auto mode."]
3834    MISSION_STATE_PAUSED = 4,
3835    #[doc = "Mission has executed all mission items."]
3836    MISSION_STATE_COMPLETE = 5,
3837}
3838impl MissionState {
3839    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3840}
3841impl Default for MissionState {
3842    fn default() -> Self {
3843        Self::DEFAULT
3844    }
3845}
3846#[cfg_attr(feature = "ts", derive(TS))]
3847#[cfg_attr(feature = "ts", ts(export))]
3848#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3850#[cfg_attr(feature = "serde", serde(tag = "type"))]
3851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3852#[repr(u32)]
3853#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3854pub enum MotorTestOrder {
3855    #[doc = "Default autopilot motor test method."]
3856    MOTOR_TEST_ORDER_DEFAULT = 0,
3857    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3858    MOTOR_TEST_ORDER_SEQUENCE = 1,
3859    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3860    MOTOR_TEST_ORDER_BOARD = 2,
3861}
3862impl MotorTestOrder {
3863    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3864}
3865impl Default for MotorTestOrder {
3866    fn default() -> Self {
3867        Self::DEFAULT
3868    }
3869}
3870#[cfg_attr(feature = "ts", derive(TS))]
3871#[cfg_attr(feature = "ts", ts(export))]
3872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3874#[cfg_attr(feature = "serde", serde(tag = "type"))]
3875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3876#[repr(u32)]
3877#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3878pub enum MotorTestThrottleType {
3879    #[doc = "Throttle as a percentage (0 ~ 100)"]
3880    MOTOR_TEST_THROTTLE_PERCENT = 0,
3881    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3882    MOTOR_TEST_THROTTLE_PWM = 1,
3883    #[doc = "Throttle pass-through from pilot's transmitter."]
3884    MOTOR_TEST_THROTTLE_PILOT = 2,
3885    #[doc = "Per-motor compass calibration test."]
3886    MOTOR_TEST_COMPASS_CAL = 3,
3887}
3888impl MotorTestThrottleType {
3889    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3890}
3891impl Default for MotorTestThrottleType {
3892    fn default() -> Self {
3893        Self::DEFAULT
3894    }
3895}
3896#[cfg_attr(feature = "ts", derive(TS))]
3897#[cfg_attr(feature = "ts", ts(export))]
3898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3900#[cfg_attr(feature = "serde", serde(tag = "type"))]
3901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3902#[repr(u32)]
3903pub enum NavVtolLandOptions {
3904    #[doc = "Default autopilot landing behaviour."]
3905    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3906    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3907    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3908    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3909    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3910}
3911impl NavVtolLandOptions {
3912    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3913}
3914impl Default for NavVtolLandOptions {
3915    fn default() -> Self {
3916        Self::DEFAULT
3917    }
3918}
3919#[cfg_attr(feature = "ts", derive(TS))]
3920#[cfg_attr(feature = "ts", ts(export))]
3921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3923#[cfg_attr(feature = "serde", serde(tag = "type"))]
3924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3925#[repr(u32)]
3926#[doc = "Yaw behaviour during orbit flight."]
3927pub enum OrbitYawBehaviour {
3928    #[doc = "Vehicle front points to the center (default)."]
3929    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3930    #[doc = "Vehicle front holds heading when message received."]
3931    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3932    #[doc = "Yaw uncontrolled."]
3933    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3934    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3935    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3936    #[doc = "Yaw controlled by RC input."]
3937    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3938    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3939    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3940}
3941impl OrbitYawBehaviour {
3942    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3943}
3944impl Default for OrbitYawBehaviour {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[cfg_attr(feature = "ts", derive(TS))]
3950#[cfg_attr(feature = "ts", ts(export))]
3951#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3953#[cfg_attr(feature = "serde", serde(tag = "type"))]
3954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3955#[repr(u32)]
3956#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3957pub enum ParachuteAction {
3958    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3959    PARACHUTE_DISABLE = 0,
3960    #[doc = "Enable auto-release of parachute."]
3961    PARACHUTE_ENABLE = 1,
3962    #[doc = "Release parachute and kill motors."]
3963    PARACHUTE_RELEASE = 2,
3964}
3965impl ParachuteAction {
3966    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3967}
3968impl Default for ParachuteAction {
3969    fn default() -> Self {
3970        Self::DEFAULT
3971    }
3972}
3973#[cfg_attr(feature = "ts", derive(TS))]
3974#[cfg_attr(feature = "ts", ts(export))]
3975#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3977#[cfg_attr(feature = "serde", serde(tag = "type"))]
3978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3979#[repr(u32)]
3980#[doc = "Result from PARAM_EXT_SET message."]
3981pub enum ParamAck {
3982    #[doc = "Parameter value ACCEPTED and SET"]
3983    PARAM_ACK_ACCEPTED = 0,
3984    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3985    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3986    #[doc = "Parameter failed to set"]
3987    PARAM_ACK_FAILED = 2,
3988    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3989    PARAM_ACK_IN_PROGRESS = 3,
3990}
3991impl ParamAck {
3992    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3993}
3994impl Default for ParamAck {
3995    fn default() -> Self {
3996        Self::DEFAULT
3997    }
3998}
3999bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4000impl PositionTargetTypemask {
4001    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4002}
4003impl Default for PositionTargetTypemask {
4004    fn default() -> Self {
4005        Self::DEFAULT
4006    }
4007}
4008#[cfg_attr(feature = "ts", derive(TS))]
4009#[cfg_attr(feature = "ts", ts(export))]
4010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4012#[cfg_attr(feature = "serde", serde(tag = "type"))]
4013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4014#[repr(u32)]
4015#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4016pub enum PrecisionLandMode {
4017    #[doc = "Normal (non-precision) landing."]
4018    PRECISION_LAND_MODE_DISABLED = 0,
4019    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4020    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4021    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4022    PRECISION_LAND_MODE_REQUIRED = 2,
4023}
4024impl PrecisionLandMode {
4025    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4026}
4027impl Default for PrecisionLandMode {
4028    fn default() -> Self {
4029        Self::DEFAULT
4030    }
4031}
4032#[cfg_attr(feature = "ts", derive(TS))]
4033#[cfg_attr(feature = "ts", ts(export))]
4034#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4036#[cfg_attr(feature = "serde", serde(tag = "type"))]
4037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4038#[repr(u32)]
4039#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4040pub enum PreflightStorageMissionAction {
4041    #[doc = "Read current mission data from persistent storage"]
4042    MISSION_READ_PERSISTENT = 0,
4043    #[doc = "Write current mission data to persistent storage"]
4044    MISSION_WRITE_PERSISTENT = 1,
4045    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4046    MISSION_RESET_DEFAULT = 2,
4047}
4048impl PreflightStorageMissionAction {
4049    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4050}
4051impl Default for PreflightStorageMissionAction {
4052    fn default() -> Self {
4053        Self::DEFAULT
4054    }
4055}
4056#[cfg_attr(feature = "ts", derive(TS))]
4057#[cfg_attr(feature = "ts", ts(export))]
4058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4060#[cfg_attr(feature = "serde", serde(tag = "type"))]
4061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4062#[repr(u32)]
4063#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4064pub enum PreflightStorageParameterAction {
4065    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4066    PARAM_READ_PERSISTENT = 0,
4067    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4068    PARAM_WRITE_PERSISTENT = 1,
4069    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4070    PARAM_RESET_CONFIG_DEFAULT = 2,
4071    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4072    PARAM_RESET_SENSOR_DEFAULT = 3,
4073    #[doc = "Reset all parameters, including operation counters, to default values"]
4074    PARAM_RESET_ALL_DEFAULT = 4,
4075}
4076impl PreflightStorageParameterAction {
4077    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4078}
4079impl Default for PreflightStorageParameterAction {
4080    fn default() -> Self {
4081        Self::DEFAULT
4082    }
4083}
4084#[cfg_attr(feature = "ts", derive(TS))]
4085#[cfg_attr(feature = "ts", ts(export))]
4086#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4088#[cfg_attr(feature = "serde", serde(tag = "type"))]
4089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4090#[repr(u32)]
4091#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4092pub enum RcSubType {
4093    #[doc = "Spektrum DSM2"]
4094    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4095    #[doc = "Spektrum DSMX"]
4096    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4097    #[doc = "Spektrum DSMX8"]
4098    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4099}
4100impl RcSubType {
4101    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4102}
4103impl Default for RcSubType {
4104    fn default() -> Self {
4105        Self::DEFAULT
4106    }
4107}
4108#[cfg_attr(feature = "ts", derive(TS))]
4109#[cfg_attr(feature = "ts", ts(export))]
4110#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4112#[cfg_attr(feature = "serde", serde(tag = "type"))]
4113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4114#[repr(u32)]
4115#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4116pub enum RcType {
4117    #[doc = "Spektrum"]
4118    RC_TYPE_SPEKTRUM = 0,
4119    #[doc = "CRSF"]
4120    RC_TYPE_CRSF = 1,
4121}
4122impl RcType {
4123    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4124}
4125impl Default for RcType {
4126    fn default() -> Self {
4127        Self::DEFAULT
4128    }
4129}
4130#[cfg_attr(feature = "ts", derive(TS))]
4131#[cfg_attr(feature = "ts", ts(export))]
4132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4134#[cfg_attr(feature = "serde", serde(tag = "type"))]
4135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4136#[repr(u32)]
4137#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4138pub enum RebootShutdownConditions {
4139    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4140    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4141    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4142    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4143}
4144impl RebootShutdownConditions {
4145    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4146}
4147impl Default for RebootShutdownConditions {
4148    fn default() -> Self {
4149        Self::DEFAULT
4150    }
4151}
4152#[cfg_attr(feature = "ts", derive(TS))]
4153#[cfg_attr(feature = "ts", ts(export))]
4154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4156#[cfg_attr(feature = "serde", serde(tag = "type"))]
4157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4158#[repr(u32)]
4159#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4160pub enum RtkBaselineCoordinateSystem {
4161    #[doc = "Earth-centered, Earth-fixed"]
4162    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4163    #[doc = "RTK basestation centered, north, east, down"]
4164    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4165}
4166impl RtkBaselineCoordinateSystem {
4167    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4168}
4169impl Default for RtkBaselineCoordinateSystem {
4170    fn default() -> Self {
4171        Self::DEFAULT
4172    }
4173}
4174#[cfg_attr(feature = "ts", derive(TS))]
4175#[cfg_attr(feature = "ts", ts(export))]
4176#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4178#[cfg_attr(feature = "serde", serde(tag = "type"))]
4179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4180#[repr(u32)]
4181#[doc = "Possible safety switch states."]
4182pub enum SafetySwitchState {
4183    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4184    SAFETY_SWITCH_STATE_SAFE = 0,
4185    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4186    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4187}
4188impl SafetySwitchState {
4189    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4190}
4191impl Default for SafetySwitchState {
4192    fn default() -> Self {
4193        Self::DEFAULT
4194    }
4195}
4196#[cfg_attr(feature = "ts", derive(TS))]
4197#[cfg_attr(feature = "ts", ts(export))]
4198#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4200#[cfg_attr(feature = "serde", serde(tag = "type"))]
4201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4202#[repr(u32)]
4203#[doc = "SERIAL_CONTROL device types"]
4204pub enum SerialControlDev {
4205    #[doc = "First telemetry port"]
4206    SERIAL_CONTROL_DEV_TELEM1 = 0,
4207    #[doc = "Second telemetry port"]
4208    SERIAL_CONTROL_DEV_TELEM2 = 1,
4209    #[doc = "First GPS port"]
4210    SERIAL_CONTROL_DEV_GPS1 = 2,
4211    #[doc = "Second GPS port"]
4212    SERIAL_CONTROL_DEV_GPS2 = 3,
4213    #[doc = "system shell"]
4214    SERIAL_CONTROL_DEV_SHELL = 10,
4215    #[doc = "SERIAL0"]
4216    SERIAL_CONTROL_SERIAL0 = 100,
4217    #[doc = "SERIAL1"]
4218    SERIAL_CONTROL_SERIAL1 = 101,
4219    #[doc = "SERIAL2"]
4220    SERIAL_CONTROL_SERIAL2 = 102,
4221    #[doc = "SERIAL3"]
4222    SERIAL_CONTROL_SERIAL3 = 103,
4223    #[doc = "SERIAL4"]
4224    SERIAL_CONTROL_SERIAL4 = 104,
4225    #[doc = "SERIAL5"]
4226    SERIAL_CONTROL_SERIAL5 = 105,
4227    #[doc = "SERIAL6"]
4228    SERIAL_CONTROL_SERIAL6 = 106,
4229    #[doc = "SERIAL7"]
4230    SERIAL_CONTROL_SERIAL7 = 107,
4231    #[doc = "SERIAL8"]
4232    SERIAL_CONTROL_SERIAL8 = 108,
4233    #[doc = "SERIAL9"]
4234    SERIAL_CONTROL_SERIAL9 = 109,
4235}
4236impl SerialControlDev {
4237    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4238}
4239impl Default for SerialControlDev {
4240    fn default() -> Self {
4241        Self::DEFAULT
4242    }
4243}
4244bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4245impl SerialControlFlag {
4246    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4247}
4248impl Default for SerialControlFlag {
4249    fn default() -> Self {
4250        Self::DEFAULT
4251    }
4252}
4253#[cfg_attr(feature = "ts", derive(TS))]
4254#[cfg_attr(feature = "ts", ts(export))]
4255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4257#[cfg_attr(feature = "serde", serde(tag = "type"))]
4258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4259#[repr(u32)]
4260#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4261pub enum SetFocusType {
4262    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4263    FOCUS_TYPE_STEP = 0,
4264    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4265    FOCUS_TYPE_CONTINUOUS = 1,
4266    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4267    FOCUS_TYPE_RANGE = 2,
4268    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4269    FOCUS_TYPE_METERS = 3,
4270    #[doc = "Focus automatically."]
4271    FOCUS_TYPE_AUTO = 4,
4272    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4273    FOCUS_TYPE_AUTO_SINGLE = 5,
4274    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4275    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4276}
4277impl SetFocusType {
4278    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4279}
4280impl Default for SetFocusType {
4281    fn default() -> Self {
4282        Self::DEFAULT
4283    }
4284}
4285#[cfg_attr(feature = "ts", derive(TS))]
4286#[cfg_attr(feature = "ts", ts(export))]
4287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4289#[cfg_attr(feature = "serde", serde(tag = "type"))]
4290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4291#[repr(u32)]
4292#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4293pub enum SpeedType {
4294    #[doc = "Airspeed"]
4295    SPEED_TYPE_AIRSPEED = 0,
4296    #[doc = "Groundspeed"]
4297    SPEED_TYPE_GROUNDSPEED = 1,
4298    #[doc = "Climb speed"]
4299    SPEED_TYPE_CLIMB_SPEED = 2,
4300    #[doc = "Descent speed"]
4301    SPEED_TYPE_DESCENT_SPEED = 3,
4302}
4303impl SpeedType {
4304    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4305}
4306impl Default for SpeedType {
4307    fn default() -> Self {
4308        Self::DEFAULT
4309    }
4310}
4311#[cfg_attr(feature = "ts", derive(TS))]
4312#[cfg_attr(feature = "ts", ts(export))]
4313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4315#[cfg_attr(feature = "serde", serde(tag = "type"))]
4316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4317#[repr(u32)]
4318#[doc = "Flags to indicate the status of camera storage."]
4319pub enum StorageStatus {
4320    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4321    STORAGE_STATUS_EMPTY = 0,
4322    #[doc = "Storage present but unformatted."]
4323    STORAGE_STATUS_UNFORMATTED = 1,
4324    #[doc = "Storage present and ready."]
4325    STORAGE_STATUS_READY = 2,
4326    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4327    STORAGE_STATUS_NOT_SUPPORTED = 3,
4328}
4329impl StorageStatus {
4330    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4331}
4332impl Default for StorageStatus {
4333    fn default() -> Self {
4334        Self::DEFAULT
4335    }
4336}
4337#[cfg_attr(feature = "ts", derive(TS))]
4338#[cfg_attr(feature = "ts", ts(export))]
4339#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4341#[cfg_attr(feature = "serde", serde(tag = "type"))]
4342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4343#[repr(u32)]
4344#[doc = "Flags to indicate the type of storage."]
4345pub enum StorageType {
4346    #[doc = "Storage type is not known."]
4347    STORAGE_TYPE_UNKNOWN = 0,
4348    #[doc = "Storage type is USB device."]
4349    STORAGE_TYPE_USB_STICK = 1,
4350    #[doc = "Storage type is SD card."]
4351    STORAGE_TYPE_SD = 2,
4352    #[doc = "Storage type is microSD card."]
4353    STORAGE_TYPE_MICROSD = 3,
4354    #[doc = "Storage type is CFast."]
4355    STORAGE_TYPE_CF = 4,
4356    #[doc = "Storage type is CFexpress."]
4357    STORAGE_TYPE_CFE = 5,
4358    #[doc = "Storage type is XQD."]
4359    STORAGE_TYPE_XQD = 6,
4360    #[doc = "Storage type is HD mass storage type."]
4361    STORAGE_TYPE_HD = 7,
4362    #[doc = "Storage type is other, not listed type."]
4363    STORAGE_TYPE_OTHER = 254,
4364}
4365impl StorageType {
4366    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4367}
4368impl Default for StorageType {
4369    fn default() -> Self {
4370        Self::DEFAULT
4371    }
4372}
4373bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4374impl StorageUsageFlag {
4375    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4376}
4377impl Default for StorageUsageFlag {
4378    fn default() -> Self {
4379        Self::DEFAULT
4380    }
4381}
4382#[cfg_attr(feature = "ts", derive(TS))]
4383#[cfg_attr(feature = "ts", ts(export))]
4384#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4386#[cfg_attr(feature = "serde", serde(tag = "type"))]
4387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4388#[repr(u32)]
4389#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4390pub enum TuneFormat {
4391    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4392    TUNE_FORMAT_QBASIC1_1 = 1,
4393    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4394    TUNE_FORMAT_MML_MODERN = 2,
4395}
4396impl TuneFormat {
4397    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4398}
4399impl Default for TuneFormat {
4400    fn default() -> Self {
4401        Self::DEFAULT
4402    }
4403}
4404#[cfg_attr(feature = "ts", derive(TS))]
4405#[cfg_attr(feature = "ts", ts(export))]
4406#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4408#[cfg_attr(feature = "serde", serde(tag = "type"))]
4409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4410#[repr(u32)]
4411#[doc = "Generalized UAVCAN node health"]
4412pub enum UavcanNodeHealth {
4413    #[doc = "The node is functioning properly."]
4414    UAVCAN_NODE_HEALTH_OK = 0,
4415    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4416    UAVCAN_NODE_HEALTH_WARNING = 1,
4417    #[doc = "The node has encountered a major failure."]
4418    UAVCAN_NODE_HEALTH_ERROR = 2,
4419    #[doc = "The node has suffered a fatal malfunction."]
4420    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4421}
4422impl UavcanNodeHealth {
4423    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4424}
4425impl Default for UavcanNodeHealth {
4426    fn default() -> Self {
4427        Self::DEFAULT
4428    }
4429}
4430#[cfg_attr(feature = "ts", derive(TS))]
4431#[cfg_attr(feature = "ts", ts(export))]
4432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4434#[cfg_attr(feature = "serde", serde(tag = "type"))]
4435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4436#[repr(u32)]
4437#[doc = "Generalized UAVCAN node mode"]
4438pub enum UavcanNodeMode {
4439    #[doc = "The node is performing its primary functions."]
4440    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4441    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4442    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4443    #[doc = "The node is under maintenance."]
4444    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4445    #[doc = "The node is in the process of updating its software."]
4446    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4447    #[doc = "The node is no longer available online."]
4448    UAVCAN_NODE_MODE_OFFLINE = 7,
4449}
4450impl UavcanNodeMode {
4451    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4452}
4453impl Default for UavcanNodeMode {
4454    fn default() -> Self {
4455        Self::DEFAULT
4456    }
4457}
4458bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4459impl UtmDataAvailFlags {
4460    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4461}
4462impl Default for UtmDataAvailFlags {
4463    fn default() -> Self {
4464        Self::DEFAULT
4465    }
4466}
4467#[cfg_attr(feature = "ts", derive(TS))]
4468#[cfg_attr(feature = "ts", ts(export))]
4469#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4471#[cfg_attr(feature = "serde", serde(tag = "type"))]
4472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4473#[repr(u32)]
4474#[doc = "Airborne status of UAS."]
4475pub enum UtmFlightState {
4476    #[doc = "The flight state can't be determined."]
4477    UTM_FLIGHT_STATE_UNKNOWN = 1,
4478    #[doc = "UAS on ground."]
4479    UTM_FLIGHT_STATE_GROUND = 2,
4480    #[doc = "UAS airborne."]
4481    UTM_FLIGHT_STATE_AIRBORNE = 3,
4482    #[doc = "UAS is in an emergency flight state."]
4483    UTM_FLIGHT_STATE_EMERGENCY = 16,
4484    #[doc = "UAS has no active controls."]
4485    UTM_FLIGHT_STATE_NOCTRL = 32,
4486}
4487impl UtmFlightState {
4488    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4489}
4490impl Default for UtmFlightState {
4491    fn default() -> Self {
4492        Self::DEFAULT
4493    }
4494}
4495#[cfg_attr(feature = "ts", derive(TS))]
4496#[cfg_attr(feature = "ts", ts(export))]
4497#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4499#[cfg_attr(feature = "serde", serde(tag = "type"))]
4500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4501#[repr(u32)]
4502#[doc = "Video stream encodings"]
4503pub enum VideoStreamEncoding {
4504    #[doc = "Stream encoding is unknown"]
4505    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4506    #[doc = "Stream encoding is H.264"]
4507    VIDEO_STREAM_ENCODING_H264 = 1,
4508    #[doc = "Stream encoding is H.265"]
4509    VIDEO_STREAM_ENCODING_H265 = 2,
4510}
4511impl VideoStreamEncoding {
4512    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4513}
4514impl Default for VideoStreamEncoding {
4515    fn default() -> Self {
4516        Self::DEFAULT
4517    }
4518}
4519bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4520impl VideoStreamStatusFlags {
4521    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4522}
4523impl Default for VideoStreamStatusFlags {
4524    fn default() -> Self {
4525        Self::DEFAULT
4526    }
4527}
4528#[cfg_attr(feature = "ts", derive(TS))]
4529#[cfg_attr(feature = "ts", ts(export))]
4530#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4532#[cfg_attr(feature = "serde", serde(tag = "type"))]
4533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4534#[repr(u32)]
4535#[doc = "Video stream types"]
4536pub enum VideoStreamType {
4537    #[doc = "Stream is RTSP"]
4538    VIDEO_STREAM_TYPE_RTSP = 0,
4539    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4540    VIDEO_STREAM_TYPE_RTPUDP = 1,
4541    #[doc = "Stream is MPEG on TCP"]
4542    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4543    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4544    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4545}
4546impl VideoStreamType {
4547    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4548}
4549impl Default for VideoStreamType {
4550    fn default() -> Self {
4551        Self::DEFAULT
4552    }
4553}
4554#[cfg_attr(feature = "ts", derive(TS))]
4555#[cfg_attr(feature = "ts", ts(export))]
4556#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4558#[cfg_attr(feature = "serde", serde(tag = "type"))]
4559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4560#[repr(u32)]
4561#[doc = "Direction of VTOL transition"]
4562pub enum VtolTransitionHeading {
4563    #[doc = "Respect the heading configuration of the vehicle."]
4564    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4565    #[doc = "Use the heading pointing towards the next waypoint."]
4566    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4567    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4568    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4569    #[doc = "Use the specified heading in parameter 4."]
4570    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4571    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4572    VTOL_TRANSITION_HEADING_ANY = 4,
4573}
4574impl VtolTransitionHeading {
4575    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4576}
4577impl Default for VtolTransitionHeading {
4578    fn default() -> Self {
4579        Self::DEFAULT
4580    }
4581}
4582#[cfg_attr(feature = "ts", derive(TS))]
4583#[cfg_attr(feature = "ts", ts(export))]
4584#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4586#[cfg_attr(feature = "serde", serde(tag = "type"))]
4587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4588#[repr(u32)]
4589#[doc = "WiFi Mode."]
4590pub enum WifiConfigApMode {
4591    #[doc = "WiFi mode is undefined."]
4592    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4593    #[doc = "WiFi configured as an access point."]
4594    WIFI_CONFIG_AP_MODE_AP = 1,
4595    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4596    WIFI_CONFIG_AP_MODE_STATION = 2,
4597    #[doc = "WiFi disabled."]
4598    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4599}
4600impl WifiConfigApMode {
4601    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4602}
4603impl Default for WifiConfigApMode {
4604    fn default() -> Self {
4605        Self::DEFAULT
4606    }
4607}
4608#[cfg_attr(feature = "ts", derive(TS))]
4609#[cfg_attr(feature = "ts", ts(export))]
4610#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4612#[cfg_attr(feature = "serde", serde(tag = "type"))]
4613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4614#[repr(u32)]
4615#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4616pub enum WifiConfigApResponse {
4617    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4618    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4619    #[doc = "Changes accepted."]
4620    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4621    #[doc = "Changes rejected."]
4622    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4623    #[doc = "Invalid Mode."]
4624    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4625    #[doc = "Invalid SSID."]
4626    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4627    #[doc = "Invalid Password."]
4628    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4629}
4630impl WifiConfigApResponse {
4631    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4632}
4633impl Default for WifiConfigApResponse {
4634    fn default() -> Self {
4635        Self::DEFAULT
4636    }
4637}
4638#[cfg_attr(feature = "ts", derive(TS))]
4639#[cfg_attr(feature = "ts", ts(export))]
4640#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4642#[cfg_attr(feature = "serde", serde(tag = "type"))]
4643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4644#[repr(u32)]
4645#[doc = "Winch actions."]
4646pub enum WinchActions {
4647    #[doc = "Allow motor to freewheel."]
4648    WINCH_RELAXED = 0,
4649    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4650    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4651    #[doc = "Wind or unwind line at specified rate."]
4652    WINCH_RATE_CONTROL = 2,
4653    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4654    WINCH_LOCK = 3,
4655    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4656    WINCH_DELIVER = 4,
4657    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4658    WINCH_HOLD = 5,
4659    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4660    WINCH_RETRACT = 6,
4661    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4662    WINCH_LOAD_LINE = 7,
4663    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4664    WINCH_ABANDON_LINE = 8,
4665    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4666    WINCH_LOAD_PAYLOAD = 9,
4667}
4668impl WinchActions {
4669    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4670}
4671impl Default for WinchActions {
4672    fn default() -> Self {
4673        Self::DEFAULT
4674    }
4675}
4676#[doc = "Set the vehicle attitude and body angular rates."]
4677#[doc = ""]
4678#[doc = "ID: 140"]
4679#[derive(Debug, Clone, PartialEq)]
4680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4682#[cfg_attr(feature = "ts", derive(TS))]
4683#[cfg_attr(feature = "ts", ts(export))]
4684pub struct ACTUATOR_CONTROL_TARGET_DATA {
4685    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4686    pub time_usec: u64,
4687    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4689    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4690    pub controls: [f32; 8],
4691    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4692    pub group_mlx: u8,
4693}
4694impl ACTUATOR_CONTROL_TARGET_DATA {
4695    pub const ENCODED_LEN: usize = 41usize;
4696    pub const DEFAULT: Self = Self {
4697        time_usec: 0_u64,
4698        controls: [0.0_f32; 8usize],
4699        group_mlx: 0_u8,
4700    };
4701    #[cfg(feature = "arbitrary")]
4702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4703        use arbitrary::{Arbitrary, Unstructured};
4704        let mut buf = [0u8; 1024];
4705        rng.fill_bytes(&mut buf);
4706        let mut unstructured = Unstructured::new(&buf);
4707        Self::arbitrary(&mut unstructured).unwrap_or_default()
4708    }
4709}
4710impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4711    fn default() -> Self {
4712        Self::DEFAULT.clone()
4713    }
4714}
4715impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4716    type Message = MavMessage;
4717    const ID: u32 = 140u32;
4718    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4719    const EXTRA_CRC: u8 = 181u8;
4720    const ENCODED_LEN: usize = 41usize;
4721    fn deser(
4722        _version: MavlinkVersion,
4723        __input: &[u8],
4724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4725        let avail_len = __input.len();
4726        let mut payload_buf = [0; Self::ENCODED_LEN];
4727        let mut buf = if avail_len < Self::ENCODED_LEN {
4728            payload_buf[0..avail_len].copy_from_slice(__input);
4729            Bytes::new(&payload_buf)
4730        } else {
4731            Bytes::new(__input)
4732        };
4733        let mut __struct = Self::default();
4734        __struct.time_usec = buf.get_u64_le();
4735        for v in &mut __struct.controls {
4736            let val = buf.get_f32_le();
4737            *v = val;
4738        }
4739        __struct.group_mlx = buf.get_u8();
4740        Ok(__struct)
4741    }
4742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4743        let mut __tmp = BytesMut::new(bytes);
4744        #[allow(clippy::absurd_extreme_comparisons)]
4745        #[allow(unused_comparisons)]
4746        if __tmp.remaining() < Self::ENCODED_LEN {
4747            panic!(
4748                "buffer is too small (need {} bytes, but got {})",
4749                Self::ENCODED_LEN,
4750                __tmp.remaining(),
4751            )
4752        }
4753        __tmp.put_u64_le(self.time_usec);
4754        for val in &self.controls {
4755            __tmp.put_f32_le(*val);
4756        }
4757        __tmp.put_u8(self.group_mlx);
4758        if matches!(version, MavlinkVersion::V2) {
4759            let len = __tmp.len();
4760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4761        } else {
4762            __tmp.len()
4763        }
4764    }
4765}
4766#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4767#[doc = ""]
4768#[doc = "ID: 375"]
4769#[derive(Debug, Clone, PartialEq)]
4770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4772#[cfg_attr(feature = "ts", derive(TS))]
4773#[cfg_attr(feature = "ts", ts(export))]
4774pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4775    #[doc = "Timestamp (since system boot)."]
4776    pub time_usec: u64,
4777    #[doc = "Active outputs"]
4778    pub active: u32,
4779    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4780    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4781    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4782    pub actuator: [f32; 32],
4783}
4784impl ACTUATOR_OUTPUT_STATUS_DATA {
4785    pub const ENCODED_LEN: usize = 140usize;
4786    pub const DEFAULT: Self = Self {
4787        time_usec: 0_u64,
4788        active: 0_u32,
4789        actuator: [0.0_f32; 32usize],
4790    };
4791    #[cfg(feature = "arbitrary")]
4792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4793        use arbitrary::{Arbitrary, Unstructured};
4794        let mut buf = [0u8; 1024];
4795        rng.fill_bytes(&mut buf);
4796        let mut unstructured = Unstructured::new(&buf);
4797        Self::arbitrary(&mut unstructured).unwrap_or_default()
4798    }
4799}
4800impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4801    fn default() -> Self {
4802        Self::DEFAULT.clone()
4803    }
4804}
4805impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4806    type Message = MavMessage;
4807    const ID: u32 = 375u32;
4808    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4809    const EXTRA_CRC: u8 = 251u8;
4810    const ENCODED_LEN: usize = 140usize;
4811    fn deser(
4812        _version: MavlinkVersion,
4813        __input: &[u8],
4814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4815        let avail_len = __input.len();
4816        let mut payload_buf = [0; Self::ENCODED_LEN];
4817        let mut buf = if avail_len < Self::ENCODED_LEN {
4818            payload_buf[0..avail_len].copy_from_slice(__input);
4819            Bytes::new(&payload_buf)
4820        } else {
4821            Bytes::new(__input)
4822        };
4823        let mut __struct = Self::default();
4824        __struct.time_usec = buf.get_u64_le();
4825        __struct.active = buf.get_u32_le();
4826        for v in &mut __struct.actuator {
4827            let val = buf.get_f32_le();
4828            *v = val;
4829        }
4830        Ok(__struct)
4831    }
4832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4833        let mut __tmp = BytesMut::new(bytes);
4834        #[allow(clippy::absurd_extreme_comparisons)]
4835        #[allow(unused_comparisons)]
4836        if __tmp.remaining() < Self::ENCODED_LEN {
4837            panic!(
4838                "buffer is too small (need {} bytes, but got {})",
4839                Self::ENCODED_LEN,
4840                __tmp.remaining(),
4841            )
4842        }
4843        __tmp.put_u64_le(self.time_usec);
4844        __tmp.put_u32_le(self.active);
4845        for val in &self.actuator {
4846            __tmp.put_f32_le(*val);
4847        }
4848        if matches!(version, MavlinkVersion::V2) {
4849            let len = __tmp.len();
4850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4851        } else {
4852            __tmp.len()
4853        }
4854    }
4855}
4856#[doc = "The location and information of an ADSB vehicle."]
4857#[doc = ""]
4858#[doc = "ID: 246"]
4859#[derive(Debug, Clone, PartialEq)]
4860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4862#[cfg_attr(feature = "ts", derive(TS))]
4863#[cfg_attr(feature = "ts", ts(export))]
4864pub struct ADSB_VEHICLE_DATA {
4865    #[doc = "ICAO address"]
4866    pub ICAO_address: u32,
4867    #[doc = "Latitude"]
4868    pub lat: i32,
4869    #[doc = "Longitude"]
4870    pub lon: i32,
4871    #[doc = "Altitude(ASL)"]
4872    pub altitude: i32,
4873    #[doc = "Course over ground"]
4874    pub heading: u16,
4875    #[doc = "The horizontal velocity"]
4876    pub hor_velocity: u16,
4877    #[doc = "The vertical velocity. Positive is up"]
4878    pub ver_velocity: i16,
4879    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4880    pub flags: AdsbFlags,
4881    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4882    pub squawk: u16,
4883    #[doc = "ADSB altitude type."]
4884    pub altitude_type: AdsbAltitudeType,
4885    #[doc = "The callsign, 8+null"]
4886    #[cfg_attr(feature = "ts", ts(type = "string"))]
4887    pub callsign: CharArray<9>,
4888    #[doc = "ADSB emitter type."]
4889    pub emitter_type: AdsbEmitterType,
4890    #[doc = "Time since last communication in seconds"]
4891    pub tslc: u8,
4892}
4893impl ADSB_VEHICLE_DATA {
4894    pub const ENCODED_LEN: usize = 38usize;
4895    pub const DEFAULT: Self = Self {
4896        ICAO_address: 0_u32,
4897        lat: 0_i32,
4898        lon: 0_i32,
4899        altitude: 0_i32,
4900        heading: 0_u16,
4901        hor_velocity: 0_u16,
4902        ver_velocity: 0_i16,
4903        flags: AdsbFlags::DEFAULT,
4904        squawk: 0_u16,
4905        altitude_type: AdsbAltitudeType::DEFAULT,
4906        callsign: CharArray::new([0_u8; 9usize]),
4907        emitter_type: AdsbEmitterType::DEFAULT,
4908        tslc: 0_u8,
4909    };
4910    #[cfg(feature = "arbitrary")]
4911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4912        use arbitrary::{Arbitrary, Unstructured};
4913        let mut buf = [0u8; 1024];
4914        rng.fill_bytes(&mut buf);
4915        let mut unstructured = Unstructured::new(&buf);
4916        Self::arbitrary(&mut unstructured).unwrap_or_default()
4917    }
4918}
4919impl Default for ADSB_VEHICLE_DATA {
4920    fn default() -> Self {
4921        Self::DEFAULT.clone()
4922    }
4923}
4924impl MessageData for ADSB_VEHICLE_DATA {
4925    type Message = MavMessage;
4926    const ID: u32 = 246u32;
4927    const NAME: &'static str = "ADSB_VEHICLE";
4928    const EXTRA_CRC: u8 = 184u8;
4929    const ENCODED_LEN: usize = 38usize;
4930    fn deser(
4931        _version: MavlinkVersion,
4932        __input: &[u8],
4933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4934        let avail_len = __input.len();
4935        let mut payload_buf = [0; Self::ENCODED_LEN];
4936        let mut buf = if avail_len < Self::ENCODED_LEN {
4937            payload_buf[0..avail_len].copy_from_slice(__input);
4938            Bytes::new(&payload_buf)
4939        } else {
4940            Bytes::new(__input)
4941        };
4942        let mut __struct = Self::default();
4943        __struct.ICAO_address = buf.get_u32_le();
4944        __struct.lat = buf.get_i32_le();
4945        __struct.lon = buf.get_i32_le();
4946        __struct.altitude = buf.get_i32_le();
4947        __struct.heading = buf.get_u16_le();
4948        __struct.hor_velocity = buf.get_u16_le();
4949        __struct.ver_velocity = buf.get_i16_le();
4950        let tmp = buf.get_u16_le();
4951        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4952            ::mavlink_core::error::ParserError::InvalidFlag {
4953                flag_type: "AdsbFlags",
4954                value: tmp as u32,
4955            },
4956        )?;
4957        __struct.squawk = buf.get_u16_le();
4958        let tmp = buf.get_u8();
4959        __struct.altitude_type =
4960            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4961                enum_type: "AdsbAltitudeType",
4962                value: tmp as u32,
4963            })?;
4964        let mut tmp = [0_u8; 9usize];
4965        for v in &mut tmp {
4966            *v = buf.get_u8();
4967        }
4968        __struct.callsign = CharArray::new(tmp);
4969        let tmp = buf.get_u8();
4970        __struct.emitter_type =
4971            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4972                enum_type: "AdsbEmitterType",
4973                value: tmp as u32,
4974            })?;
4975        __struct.tslc = buf.get_u8();
4976        Ok(__struct)
4977    }
4978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4979        let mut __tmp = BytesMut::new(bytes);
4980        #[allow(clippy::absurd_extreme_comparisons)]
4981        #[allow(unused_comparisons)]
4982        if __tmp.remaining() < Self::ENCODED_LEN {
4983            panic!(
4984                "buffer is too small (need {} bytes, but got {})",
4985                Self::ENCODED_LEN,
4986                __tmp.remaining(),
4987            )
4988        }
4989        __tmp.put_u32_le(self.ICAO_address);
4990        __tmp.put_i32_le(self.lat);
4991        __tmp.put_i32_le(self.lon);
4992        __tmp.put_i32_le(self.altitude);
4993        __tmp.put_u16_le(self.heading);
4994        __tmp.put_u16_le(self.hor_velocity);
4995        __tmp.put_i16_le(self.ver_velocity);
4996        __tmp.put_u16_le(self.flags.bits());
4997        __tmp.put_u16_le(self.squawk);
4998        __tmp.put_u8(self.altitude_type as u8);
4999        for val in &self.callsign {
5000            __tmp.put_u8(*val);
5001        }
5002        __tmp.put_u8(self.emitter_type as u8);
5003        __tmp.put_u8(self.tslc);
5004        if matches!(version, MavlinkVersion::V2) {
5005            let len = __tmp.len();
5006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5007        } else {
5008            __tmp.len()
5009        }
5010    }
5011}
5012#[doc = "The location and information of an AIS vessel."]
5013#[doc = ""]
5014#[doc = "ID: 301"]
5015#[derive(Debug, Clone, PartialEq)]
5016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5018#[cfg_attr(feature = "ts", derive(TS))]
5019#[cfg_attr(feature = "ts", ts(export))]
5020pub struct AIS_VESSEL_DATA {
5021    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5022    pub MMSI: u32,
5023    #[doc = "Latitude"]
5024    pub lat: i32,
5025    #[doc = "Longitude"]
5026    pub lon: i32,
5027    #[doc = "Course over ground"]
5028    pub COG: u16,
5029    #[doc = "True heading"]
5030    pub heading: u16,
5031    #[doc = "Speed over ground"]
5032    pub velocity: u16,
5033    #[doc = "Distance from lat/lon location to bow"]
5034    pub dimension_bow: u16,
5035    #[doc = "Distance from lat/lon location to stern"]
5036    pub dimension_stern: u16,
5037    #[doc = "Time since last communication in seconds"]
5038    pub tslc: u16,
5039    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5040    pub flags: AisFlags,
5041    #[doc = "Turn rate"]
5042    pub turn_rate: i8,
5043    #[doc = "Navigational status"]
5044    pub navigational_status: AisNavStatus,
5045    #[doc = "Type of vessels"]
5046    pub mavtype: AisType,
5047    #[doc = "Distance from lat/lon location to port side"]
5048    pub dimension_port: u8,
5049    #[doc = "Distance from lat/lon location to starboard side"]
5050    pub dimension_starboard: u8,
5051    #[doc = "The vessel callsign"]
5052    #[cfg_attr(feature = "ts", ts(type = "string"))]
5053    pub callsign: CharArray<7>,
5054    #[doc = "The vessel name"]
5055    #[cfg_attr(feature = "ts", ts(type = "string"))]
5056    pub name: CharArray<20>,
5057}
5058impl AIS_VESSEL_DATA {
5059    pub const ENCODED_LEN: usize = 58usize;
5060    pub const DEFAULT: Self = Self {
5061        MMSI: 0_u32,
5062        lat: 0_i32,
5063        lon: 0_i32,
5064        COG: 0_u16,
5065        heading: 0_u16,
5066        velocity: 0_u16,
5067        dimension_bow: 0_u16,
5068        dimension_stern: 0_u16,
5069        tslc: 0_u16,
5070        flags: AisFlags::DEFAULT,
5071        turn_rate: 0_i8,
5072        navigational_status: AisNavStatus::DEFAULT,
5073        mavtype: AisType::DEFAULT,
5074        dimension_port: 0_u8,
5075        dimension_starboard: 0_u8,
5076        callsign: CharArray::new([0_u8; 7usize]),
5077        name: CharArray::new([0_u8; 20usize]),
5078    };
5079    #[cfg(feature = "arbitrary")]
5080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5081        use arbitrary::{Arbitrary, Unstructured};
5082        let mut buf = [0u8; 1024];
5083        rng.fill_bytes(&mut buf);
5084        let mut unstructured = Unstructured::new(&buf);
5085        Self::arbitrary(&mut unstructured).unwrap_or_default()
5086    }
5087}
5088impl Default for AIS_VESSEL_DATA {
5089    fn default() -> Self {
5090        Self::DEFAULT.clone()
5091    }
5092}
5093impl MessageData for AIS_VESSEL_DATA {
5094    type Message = MavMessage;
5095    const ID: u32 = 301u32;
5096    const NAME: &'static str = "AIS_VESSEL";
5097    const EXTRA_CRC: u8 = 243u8;
5098    const ENCODED_LEN: usize = 58usize;
5099    fn deser(
5100        _version: MavlinkVersion,
5101        __input: &[u8],
5102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5103        let avail_len = __input.len();
5104        let mut payload_buf = [0; Self::ENCODED_LEN];
5105        let mut buf = if avail_len < Self::ENCODED_LEN {
5106            payload_buf[0..avail_len].copy_from_slice(__input);
5107            Bytes::new(&payload_buf)
5108        } else {
5109            Bytes::new(__input)
5110        };
5111        let mut __struct = Self::default();
5112        __struct.MMSI = buf.get_u32_le();
5113        __struct.lat = buf.get_i32_le();
5114        __struct.lon = buf.get_i32_le();
5115        __struct.COG = buf.get_u16_le();
5116        __struct.heading = buf.get_u16_le();
5117        __struct.velocity = buf.get_u16_le();
5118        __struct.dimension_bow = buf.get_u16_le();
5119        __struct.dimension_stern = buf.get_u16_le();
5120        __struct.tslc = buf.get_u16_le();
5121        let tmp = buf.get_u16_le();
5122        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5123            ::mavlink_core::error::ParserError::InvalidFlag {
5124                flag_type: "AisFlags",
5125                value: tmp as u32,
5126            },
5127        )?;
5128        __struct.turn_rate = buf.get_i8();
5129        let tmp = buf.get_u8();
5130        __struct.navigational_status =
5131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5132                enum_type: "AisNavStatus",
5133                value: tmp as u32,
5134            })?;
5135        let tmp = buf.get_u8();
5136        __struct.mavtype =
5137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5138                enum_type: "AisType",
5139                value: tmp as u32,
5140            })?;
5141        __struct.dimension_port = buf.get_u8();
5142        __struct.dimension_starboard = buf.get_u8();
5143        let mut tmp = [0_u8; 7usize];
5144        for v in &mut tmp {
5145            *v = buf.get_u8();
5146        }
5147        __struct.callsign = CharArray::new(tmp);
5148        let mut tmp = [0_u8; 20usize];
5149        for v in &mut tmp {
5150            *v = buf.get_u8();
5151        }
5152        __struct.name = CharArray::new(tmp);
5153        Ok(__struct)
5154    }
5155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5156        let mut __tmp = BytesMut::new(bytes);
5157        #[allow(clippy::absurd_extreme_comparisons)]
5158        #[allow(unused_comparisons)]
5159        if __tmp.remaining() < Self::ENCODED_LEN {
5160            panic!(
5161                "buffer is too small (need {} bytes, but got {})",
5162                Self::ENCODED_LEN,
5163                __tmp.remaining(),
5164            )
5165        }
5166        __tmp.put_u32_le(self.MMSI);
5167        __tmp.put_i32_le(self.lat);
5168        __tmp.put_i32_le(self.lon);
5169        __tmp.put_u16_le(self.COG);
5170        __tmp.put_u16_le(self.heading);
5171        __tmp.put_u16_le(self.velocity);
5172        __tmp.put_u16_le(self.dimension_bow);
5173        __tmp.put_u16_le(self.dimension_stern);
5174        __tmp.put_u16_le(self.tslc);
5175        __tmp.put_u16_le(self.flags.bits());
5176        __tmp.put_i8(self.turn_rate);
5177        __tmp.put_u8(self.navigational_status as u8);
5178        __tmp.put_u8(self.mavtype as u8);
5179        __tmp.put_u8(self.dimension_port);
5180        __tmp.put_u8(self.dimension_starboard);
5181        for val in &self.callsign {
5182            __tmp.put_u8(*val);
5183        }
5184        for val in &self.name {
5185            __tmp.put_u8(*val);
5186        }
5187        if matches!(version, MavlinkVersion::V2) {
5188            let len = __tmp.len();
5189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5190        } else {
5191            __tmp.len()
5192        }
5193    }
5194}
5195#[doc = "The current system altitude."]
5196#[doc = ""]
5197#[doc = "ID: 141"]
5198#[derive(Debug, Clone, PartialEq)]
5199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5201#[cfg_attr(feature = "ts", derive(TS))]
5202#[cfg_attr(feature = "ts", ts(export))]
5203pub struct ALTITUDE_DATA {
5204    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5205    pub time_usec: u64,
5206    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5207    pub altitude_monotonic: f32,
5208    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5209    pub altitude_amsl: f32,
5210    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5211    pub altitude_local: f32,
5212    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5213    pub altitude_relative: f32,
5214    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5215    pub altitude_terrain: f32,
5216    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5217    pub bottom_clearance: f32,
5218}
5219impl ALTITUDE_DATA {
5220    pub const ENCODED_LEN: usize = 32usize;
5221    pub const DEFAULT: Self = Self {
5222        time_usec: 0_u64,
5223        altitude_monotonic: 0.0_f32,
5224        altitude_amsl: 0.0_f32,
5225        altitude_local: 0.0_f32,
5226        altitude_relative: 0.0_f32,
5227        altitude_terrain: 0.0_f32,
5228        bottom_clearance: 0.0_f32,
5229    };
5230    #[cfg(feature = "arbitrary")]
5231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5232        use arbitrary::{Arbitrary, Unstructured};
5233        let mut buf = [0u8; 1024];
5234        rng.fill_bytes(&mut buf);
5235        let mut unstructured = Unstructured::new(&buf);
5236        Self::arbitrary(&mut unstructured).unwrap_or_default()
5237    }
5238}
5239impl Default for ALTITUDE_DATA {
5240    fn default() -> Self {
5241        Self::DEFAULT.clone()
5242    }
5243}
5244impl MessageData for ALTITUDE_DATA {
5245    type Message = MavMessage;
5246    const ID: u32 = 141u32;
5247    const NAME: &'static str = "ALTITUDE";
5248    const EXTRA_CRC: u8 = 47u8;
5249    const ENCODED_LEN: usize = 32usize;
5250    fn deser(
5251        _version: MavlinkVersion,
5252        __input: &[u8],
5253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5254        let avail_len = __input.len();
5255        let mut payload_buf = [0; Self::ENCODED_LEN];
5256        let mut buf = if avail_len < Self::ENCODED_LEN {
5257            payload_buf[0..avail_len].copy_from_slice(__input);
5258            Bytes::new(&payload_buf)
5259        } else {
5260            Bytes::new(__input)
5261        };
5262        let mut __struct = Self::default();
5263        __struct.time_usec = buf.get_u64_le();
5264        __struct.altitude_monotonic = buf.get_f32_le();
5265        __struct.altitude_amsl = buf.get_f32_le();
5266        __struct.altitude_local = buf.get_f32_le();
5267        __struct.altitude_relative = buf.get_f32_le();
5268        __struct.altitude_terrain = buf.get_f32_le();
5269        __struct.bottom_clearance = buf.get_f32_le();
5270        Ok(__struct)
5271    }
5272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5273        let mut __tmp = BytesMut::new(bytes);
5274        #[allow(clippy::absurd_extreme_comparisons)]
5275        #[allow(unused_comparisons)]
5276        if __tmp.remaining() < Self::ENCODED_LEN {
5277            panic!(
5278                "buffer is too small (need {} bytes, but got {})",
5279                Self::ENCODED_LEN,
5280                __tmp.remaining(),
5281            )
5282        }
5283        __tmp.put_u64_le(self.time_usec);
5284        __tmp.put_f32_le(self.altitude_monotonic);
5285        __tmp.put_f32_le(self.altitude_amsl);
5286        __tmp.put_f32_le(self.altitude_local);
5287        __tmp.put_f32_le(self.altitude_relative);
5288        __tmp.put_f32_le(self.altitude_terrain);
5289        __tmp.put_f32_le(self.bottom_clearance);
5290        if matches!(version, MavlinkVersion::V2) {
5291            let len = __tmp.len();
5292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5293        } else {
5294            __tmp.len()
5295        }
5296    }
5297}
5298#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5299#[doc = ""]
5300#[doc = "ID: 30"]
5301#[derive(Debug, Clone, PartialEq)]
5302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5304#[cfg_attr(feature = "ts", derive(TS))]
5305#[cfg_attr(feature = "ts", ts(export))]
5306pub struct ATTITUDE_DATA {
5307    #[doc = "Timestamp (time since system boot)."]
5308    pub time_boot_ms: u32,
5309    #[doc = "Roll angle (-pi..+pi)"]
5310    pub roll: f32,
5311    #[doc = "Pitch angle (-pi..+pi)"]
5312    pub pitch: f32,
5313    #[doc = "Yaw angle (-pi..+pi)"]
5314    pub yaw: f32,
5315    #[doc = "Roll angular speed"]
5316    pub rollspeed: f32,
5317    #[doc = "Pitch angular speed"]
5318    pub pitchspeed: f32,
5319    #[doc = "Yaw angular speed"]
5320    pub yawspeed: f32,
5321}
5322impl ATTITUDE_DATA {
5323    pub const ENCODED_LEN: usize = 28usize;
5324    pub const DEFAULT: Self = Self {
5325        time_boot_ms: 0_u32,
5326        roll: 0.0_f32,
5327        pitch: 0.0_f32,
5328        yaw: 0.0_f32,
5329        rollspeed: 0.0_f32,
5330        pitchspeed: 0.0_f32,
5331        yawspeed: 0.0_f32,
5332    };
5333    #[cfg(feature = "arbitrary")]
5334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5335        use arbitrary::{Arbitrary, Unstructured};
5336        let mut buf = [0u8; 1024];
5337        rng.fill_bytes(&mut buf);
5338        let mut unstructured = Unstructured::new(&buf);
5339        Self::arbitrary(&mut unstructured).unwrap_or_default()
5340    }
5341}
5342impl Default for ATTITUDE_DATA {
5343    fn default() -> Self {
5344        Self::DEFAULT.clone()
5345    }
5346}
5347impl MessageData for ATTITUDE_DATA {
5348    type Message = MavMessage;
5349    const ID: u32 = 30u32;
5350    const NAME: &'static str = "ATTITUDE";
5351    const EXTRA_CRC: u8 = 39u8;
5352    const ENCODED_LEN: usize = 28usize;
5353    fn deser(
5354        _version: MavlinkVersion,
5355        __input: &[u8],
5356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5357        let avail_len = __input.len();
5358        let mut payload_buf = [0; Self::ENCODED_LEN];
5359        let mut buf = if avail_len < Self::ENCODED_LEN {
5360            payload_buf[0..avail_len].copy_from_slice(__input);
5361            Bytes::new(&payload_buf)
5362        } else {
5363            Bytes::new(__input)
5364        };
5365        let mut __struct = Self::default();
5366        __struct.time_boot_ms = buf.get_u32_le();
5367        __struct.roll = buf.get_f32_le();
5368        __struct.pitch = buf.get_f32_le();
5369        __struct.yaw = buf.get_f32_le();
5370        __struct.rollspeed = buf.get_f32_le();
5371        __struct.pitchspeed = buf.get_f32_le();
5372        __struct.yawspeed = buf.get_f32_le();
5373        Ok(__struct)
5374    }
5375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5376        let mut __tmp = BytesMut::new(bytes);
5377        #[allow(clippy::absurd_extreme_comparisons)]
5378        #[allow(unused_comparisons)]
5379        if __tmp.remaining() < Self::ENCODED_LEN {
5380            panic!(
5381                "buffer is too small (need {} bytes, but got {})",
5382                Self::ENCODED_LEN,
5383                __tmp.remaining(),
5384            )
5385        }
5386        __tmp.put_u32_le(self.time_boot_ms);
5387        __tmp.put_f32_le(self.roll);
5388        __tmp.put_f32_le(self.pitch);
5389        __tmp.put_f32_le(self.yaw);
5390        __tmp.put_f32_le(self.rollspeed);
5391        __tmp.put_f32_le(self.pitchspeed);
5392        __tmp.put_f32_le(self.yawspeed);
5393        if matches!(version, MavlinkVersion::V2) {
5394            let len = __tmp.len();
5395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5396        } else {
5397            __tmp.len()
5398        }
5399    }
5400}
5401#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5402#[doc = ""]
5403#[doc = "ID: 31"]
5404#[derive(Debug, Clone, PartialEq)]
5405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5407#[cfg_attr(feature = "ts", derive(TS))]
5408#[cfg_attr(feature = "ts", ts(export))]
5409pub struct ATTITUDE_QUATERNION_DATA {
5410    #[doc = "Timestamp (time since system boot)."]
5411    pub time_boot_ms: u32,
5412    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5413    pub q1: f32,
5414    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5415    pub q2: f32,
5416    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5417    pub q3: f32,
5418    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5419    pub q4: f32,
5420    #[doc = "Roll angular speed"]
5421    pub rollspeed: f32,
5422    #[doc = "Pitch angular speed"]
5423    pub pitchspeed: f32,
5424    #[doc = "Yaw angular speed"]
5425    pub yawspeed: f32,
5426    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5430    pub repr_offset_q: [f32; 4],
5431}
5432impl ATTITUDE_QUATERNION_DATA {
5433    pub const ENCODED_LEN: usize = 48usize;
5434    pub const DEFAULT: Self = Self {
5435        time_boot_ms: 0_u32,
5436        q1: 0.0_f32,
5437        q2: 0.0_f32,
5438        q3: 0.0_f32,
5439        q4: 0.0_f32,
5440        rollspeed: 0.0_f32,
5441        pitchspeed: 0.0_f32,
5442        yawspeed: 0.0_f32,
5443        repr_offset_q: [0.0_f32; 4usize],
5444    };
5445    #[cfg(feature = "arbitrary")]
5446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5447        use arbitrary::{Arbitrary, Unstructured};
5448        let mut buf = [0u8; 1024];
5449        rng.fill_bytes(&mut buf);
5450        let mut unstructured = Unstructured::new(&buf);
5451        Self::arbitrary(&mut unstructured).unwrap_or_default()
5452    }
5453}
5454impl Default for ATTITUDE_QUATERNION_DATA {
5455    fn default() -> Self {
5456        Self::DEFAULT.clone()
5457    }
5458}
5459impl MessageData for ATTITUDE_QUATERNION_DATA {
5460    type Message = MavMessage;
5461    const ID: u32 = 31u32;
5462    const NAME: &'static str = "ATTITUDE_QUATERNION";
5463    const EXTRA_CRC: u8 = 246u8;
5464    const ENCODED_LEN: usize = 48usize;
5465    fn deser(
5466        _version: MavlinkVersion,
5467        __input: &[u8],
5468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5469        let avail_len = __input.len();
5470        let mut payload_buf = [0; Self::ENCODED_LEN];
5471        let mut buf = if avail_len < Self::ENCODED_LEN {
5472            payload_buf[0..avail_len].copy_from_slice(__input);
5473            Bytes::new(&payload_buf)
5474        } else {
5475            Bytes::new(__input)
5476        };
5477        let mut __struct = Self::default();
5478        __struct.time_boot_ms = buf.get_u32_le();
5479        __struct.q1 = buf.get_f32_le();
5480        __struct.q2 = buf.get_f32_le();
5481        __struct.q3 = buf.get_f32_le();
5482        __struct.q4 = buf.get_f32_le();
5483        __struct.rollspeed = buf.get_f32_le();
5484        __struct.pitchspeed = buf.get_f32_le();
5485        __struct.yawspeed = buf.get_f32_le();
5486        for v in &mut __struct.repr_offset_q {
5487            let val = buf.get_f32_le();
5488            *v = val;
5489        }
5490        Ok(__struct)
5491    }
5492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5493        let mut __tmp = BytesMut::new(bytes);
5494        #[allow(clippy::absurd_extreme_comparisons)]
5495        #[allow(unused_comparisons)]
5496        if __tmp.remaining() < Self::ENCODED_LEN {
5497            panic!(
5498                "buffer is too small (need {} bytes, but got {})",
5499                Self::ENCODED_LEN,
5500                __tmp.remaining(),
5501            )
5502        }
5503        __tmp.put_u32_le(self.time_boot_ms);
5504        __tmp.put_f32_le(self.q1);
5505        __tmp.put_f32_le(self.q2);
5506        __tmp.put_f32_le(self.q3);
5507        __tmp.put_f32_le(self.q4);
5508        __tmp.put_f32_le(self.rollspeed);
5509        __tmp.put_f32_le(self.pitchspeed);
5510        __tmp.put_f32_le(self.yawspeed);
5511        if matches!(version, MavlinkVersion::V2) {
5512            for val in &self.repr_offset_q {
5513                __tmp.put_f32_le(*val);
5514            }
5515            let len = __tmp.len();
5516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5517        } else {
5518            __tmp.len()
5519        }
5520    }
5521}
5522#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5523#[doc = ""]
5524#[doc = "ID: 61"]
5525#[derive(Debug, Clone, PartialEq)]
5526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5528#[cfg_attr(feature = "ts", derive(TS))]
5529#[cfg_attr(feature = "ts", ts(export))]
5530pub struct ATTITUDE_QUATERNION_COV_DATA {
5531    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5532    pub time_usec: u64,
5533    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5534    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5535    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5536    pub q: [f32; 4],
5537    #[doc = "Roll angular speed"]
5538    pub rollspeed: f32,
5539    #[doc = "Pitch angular speed"]
5540    pub pitchspeed: f32,
5541    #[doc = "Yaw angular speed"]
5542    pub yawspeed: f32,
5543    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5544    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5545    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5546    pub covariance: [f32; 9],
5547}
5548impl ATTITUDE_QUATERNION_COV_DATA {
5549    pub const ENCODED_LEN: usize = 72usize;
5550    pub const DEFAULT: Self = Self {
5551        time_usec: 0_u64,
5552        q: [0.0_f32; 4usize],
5553        rollspeed: 0.0_f32,
5554        pitchspeed: 0.0_f32,
5555        yawspeed: 0.0_f32,
5556        covariance: [0.0_f32; 9usize],
5557    };
5558    #[cfg(feature = "arbitrary")]
5559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5560        use arbitrary::{Arbitrary, Unstructured};
5561        let mut buf = [0u8; 1024];
5562        rng.fill_bytes(&mut buf);
5563        let mut unstructured = Unstructured::new(&buf);
5564        Self::arbitrary(&mut unstructured).unwrap_or_default()
5565    }
5566}
5567impl Default for ATTITUDE_QUATERNION_COV_DATA {
5568    fn default() -> Self {
5569        Self::DEFAULT.clone()
5570    }
5571}
5572impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5573    type Message = MavMessage;
5574    const ID: u32 = 61u32;
5575    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5576    const EXTRA_CRC: u8 = 167u8;
5577    const ENCODED_LEN: usize = 72usize;
5578    fn deser(
5579        _version: MavlinkVersion,
5580        __input: &[u8],
5581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5582        let avail_len = __input.len();
5583        let mut payload_buf = [0; Self::ENCODED_LEN];
5584        let mut buf = if avail_len < Self::ENCODED_LEN {
5585            payload_buf[0..avail_len].copy_from_slice(__input);
5586            Bytes::new(&payload_buf)
5587        } else {
5588            Bytes::new(__input)
5589        };
5590        let mut __struct = Self::default();
5591        __struct.time_usec = buf.get_u64_le();
5592        for v in &mut __struct.q {
5593            let val = buf.get_f32_le();
5594            *v = val;
5595        }
5596        __struct.rollspeed = buf.get_f32_le();
5597        __struct.pitchspeed = buf.get_f32_le();
5598        __struct.yawspeed = buf.get_f32_le();
5599        for v in &mut __struct.covariance {
5600            let val = buf.get_f32_le();
5601            *v = val;
5602        }
5603        Ok(__struct)
5604    }
5605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5606        let mut __tmp = BytesMut::new(bytes);
5607        #[allow(clippy::absurd_extreme_comparisons)]
5608        #[allow(unused_comparisons)]
5609        if __tmp.remaining() < Self::ENCODED_LEN {
5610            panic!(
5611                "buffer is too small (need {} bytes, but got {})",
5612                Self::ENCODED_LEN,
5613                __tmp.remaining(),
5614            )
5615        }
5616        __tmp.put_u64_le(self.time_usec);
5617        for val in &self.q {
5618            __tmp.put_f32_le(*val);
5619        }
5620        __tmp.put_f32_le(self.rollspeed);
5621        __tmp.put_f32_le(self.pitchspeed);
5622        __tmp.put_f32_le(self.yawspeed);
5623        for val in &self.covariance {
5624            __tmp.put_f32_le(*val);
5625        }
5626        if matches!(version, MavlinkVersion::V2) {
5627            let len = __tmp.len();
5628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5629        } else {
5630            __tmp.len()
5631        }
5632    }
5633}
5634#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5635#[doc = ""]
5636#[doc = "ID: 83"]
5637#[derive(Debug, Clone, PartialEq)]
5638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5640#[cfg_attr(feature = "ts", derive(TS))]
5641#[cfg_attr(feature = "ts", ts(export))]
5642pub struct ATTITUDE_TARGET_DATA {
5643    #[doc = "Timestamp (time since system boot)."]
5644    pub time_boot_ms: u32,
5645    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5646    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5647    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5648    pub q: [f32; 4],
5649    #[doc = "Body roll rate"]
5650    pub body_roll_rate: f32,
5651    #[doc = "Body pitch rate"]
5652    pub body_pitch_rate: f32,
5653    #[doc = "Body yaw rate"]
5654    pub body_yaw_rate: f32,
5655    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5656    pub thrust: f32,
5657    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5658    pub type_mask: AttitudeTargetTypemask,
5659}
5660impl ATTITUDE_TARGET_DATA {
5661    pub const ENCODED_LEN: usize = 37usize;
5662    pub const DEFAULT: Self = Self {
5663        time_boot_ms: 0_u32,
5664        q: [0.0_f32; 4usize],
5665        body_roll_rate: 0.0_f32,
5666        body_pitch_rate: 0.0_f32,
5667        body_yaw_rate: 0.0_f32,
5668        thrust: 0.0_f32,
5669        type_mask: AttitudeTargetTypemask::DEFAULT,
5670    };
5671    #[cfg(feature = "arbitrary")]
5672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5673        use arbitrary::{Arbitrary, Unstructured};
5674        let mut buf = [0u8; 1024];
5675        rng.fill_bytes(&mut buf);
5676        let mut unstructured = Unstructured::new(&buf);
5677        Self::arbitrary(&mut unstructured).unwrap_or_default()
5678    }
5679}
5680impl Default for ATTITUDE_TARGET_DATA {
5681    fn default() -> Self {
5682        Self::DEFAULT.clone()
5683    }
5684}
5685impl MessageData for ATTITUDE_TARGET_DATA {
5686    type Message = MavMessage;
5687    const ID: u32 = 83u32;
5688    const NAME: &'static str = "ATTITUDE_TARGET";
5689    const EXTRA_CRC: u8 = 22u8;
5690    const ENCODED_LEN: usize = 37usize;
5691    fn deser(
5692        _version: MavlinkVersion,
5693        __input: &[u8],
5694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5695        let avail_len = __input.len();
5696        let mut payload_buf = [0; Self::ENCODED_LEN];
5697        let mut buf = if avail_len < Self::ENCODED_LEN {
5698            payload_buf[0..avail_len].copy_from_slice(__input);
5699            Bytes::new(&payload_buf)
5700        } else {
5701            Bytes::new(__input)
5702        };
5703        let mut __struct = Self::default();
5704        __struct.time_boot_ms = buf.get_u32_le();
5705        for v in &mut __struct.q {
5706            let val = buf.get_f32_le();
5707            *v = val;
5708        }
5709        __struct.body_roll_rate = buf.get_f32_le();
5710        __struct.body_pitch_rate = buf.get_f32_le();
5711        __struct.body_yaw_rate = buf.get_f32_le();
5712        __struct.thrust = buf.get_f32_le();
5713        let tmp = buf.get_u8();
5714        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5715            tmp & AttitudeTargetTypemask::all().bits(),
5716        )
5717        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5718            flag_type: "AttitudeTargetTypemask",
5719            value: tmp as u32,
5720        })?;
5721        Ok(__struct)
5722    }
5723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5724        let mut __tmp = BytesMut::new(bytes);
5725        #[allow(clippy::absurd_extreme_comparisons)]
5726        #[allow(unused_comparisons)]
5727        if __tmp.remaining() < Self::ENCODED_LEN {
5728            panic!(
5729                "buffer is too small (need {} bytes, but got {})",
5730                Self::ENCODED_LEN,
5731                __tmp.remaining(),
5732            )
5733        }
5734        __tmp.put_u32_le(self.time_boot_ms);
5735        for val in &self.q {
5736            __tmp.put_f32_le(*val);
5737        }
5738        __tmp.put_f32_le(self.body_roll_rate);
5739        __tmp.put_f32_le(self.body_pitch_rate);
5740        __tmp.put_f32_le(self.body_yaw_rate);
5741        __tmp.put_f32_le(self.thrust);
5742        __tmp.put_u8(self.type_mask.bits());
5743        if matches!(version, MavlinkVersion::V2) {
5744            let len = __tmp.len();
5745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5746        } else {
5747            __tmp.len()
5748        }
5749    }
5750}
5751#[doc = "Motion capture attitude and position."]
5752#[doc = ""]
5753#[doc = "ID: 138"]
5754#[derive(Debug, Clone, PartialEq)]
5755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5757#[cfg_attr(feature = "ts", derive(TS))]
5758#[cfg_attr(feature = "ts", ts(export))]
5759pub struct ATT_POS_MOCAP_DATA {
5760    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5761    pub time_usec: u64,
5762    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5763    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5764    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5765    pub q: [f32; 4],
5766    #[doc = "X position (NED)"]
5767    pub x: f32,
5768    #[doc = "Y position (NED)"]
5769    pub y: f32,
5770    #[doc = "Z position (NED)"]
5771    pub z: f32,
5772    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5773    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5776    pub covariance: [f32; 21],
5777}
5778impl ATT_POS_MOCAP_DATA {
5779    pub const ENCODED_LEN: usize = 120usize;
5780    pub const DEFAULT: Self = Self {
5781        time_usec: 0_u64,
5782        q: [0.0_f32; 4usize],
5783        x: 0.0_f32,
5784        y: 0.0_f32,
5785        z: 0.0_f32,
5786        covariance: [0.0_f32; 21usize],
5787    };
5788    #[cfg(feature = "arbitrary")]
5789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5790        use arbitrary::{Arbitrary, Unstructured};
5791        let mut buf = [0u8; 1024];
5792        rng.fill_bytes(&mut buf);
5793        let mut unstructured = Unstructured::new(&buf);
5794        Self::arbitrary(&mut unstructured).unwrap_or_default()
5795    }
5796}
5797impl Default for ATT_POS_MOCAP_DATA {
5798    fn default() -> Self {
5799        Self::DEFAULT.clone()
5800    }
5801}
5802impl MessageData for ATT_POS_MOCAP_DATA {
5803    type Message = MavMessage;
5804    const ID: u32 = 138u32;
5805    const NAME: &'static str = "ATT_POS_MOCAP";
5806    const EXTRA_CRC: u8 = 109u8;
5807    const ENCODED_LEN: usize = 120usize;
5808    fn deser(
5809        _version: MavlinkVersion,
5810        __input: &[u8],
5811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5812        let avail_len = __input.len();
5813        let mut payload_buf = [0; Self::ENCODED_LEN];
5814        let mut buf = if avail_len < Self::ENCODED_LEN {
5815            payload_buf[0..avail_len].copy_from_slice(__input);
5816            Bytes::new(&payload_buf)
5817        } else {
5818            Bytes::new(__input)
5819        };
5820        let mut __struct = Self::default();
5821        __struct.time_usec = buf.get_u64_le();
5822        for v in &mut __struct.q {
5823            let val = buf.get_f32_le();
5824            *v = val;
5825        }
5826        __struct.x = buf.get_f32_le();
5827        __struct.y = buf.get_f32_le();
5828        __struct.z = buf.get_f32_le();
5829        for v in &mut __struct.covariance {
5830            let val = buf.get_f32_le();
5831            *v = val;
5832        }
5833        Ok(__struct)
5834    }
5835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5836        let mut __tmp = BytesMut::new(bytes);
5837        #[allow(clippy::absurd_extreme_comparisons)]
5838        #[allow(unused_comparisons)]
5839        if __tmp.remaining() < Self::ENCODED_LEN {
5840            panic!(
5841                "buffer is too small (need {} bytes, but got {})",
5842                Self::ENCODED_LEN,
5843                __tmp.remaining(),
5844            )
5845        }
5846        __tmp.put_u64_le(self.time_usec);
5847        for val in &self.q {
5848            __tmp.put_f32_le(*val);
5849        }
5850        __tmp.put_f32_le(self.x);
5851        __tmp.put_f32_le(self.y);
5852        __tmp.put_f32_le(self.z);
5853        if matches!(version, MavlinkVersion::V2) {
5854            for val in &self.covariance {
5855                __tmp.put_f32_le(*val);
5856            }
5857            let len = __tmp.len();
5858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5859        } else {
5860            __tmp.len()
5861        }
5862    }
5863}
5864#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5865#[doc = ""]
5866#[doc = "ID: 7"]
5867#[derive(Debug, Clone, PartialEq)]
5868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5870#[cfg_attr(feature = "ts", derive(TS))]
5871#[cfg_attr(feature = "ts", ts(export))]
5872pub struct AUTH_KEY_DATA {
5873    #[doc = "key"]
5874    #[cfg_attr(feature = "ts", ts(type = "string"))]
5875    pub key: CharArray<32>,
5876}
5877impl AUTH_KEY_DATA {
5878    pub const ENCODED_LEN: usize = 32usize;
5879    pub const DEFAULT: Self = Self {
5880        key: CharArray::new([0_u8; 32usize]),
5881    };
5882    #[cfg(feature = "arbitrary")]
5883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5884        use arbitrary::{Arbitrary, Unstructured};
5885        let mut buf = [0u8; 1024];
5886        rng.fill_bytes(&mut buf);
5887        let mut unstructured = Unstructured::new(&buf);
5888        Self::arbitrary(&mut unstructured).unwrap_or_default()
5889    }
5890}
5891impl Default for AUTH_KEY_DATA {
5892    fn default() -> Self {
5893        Self::DEFAULT.clone()
5894    }
5895}
5896impl MessageData for AUTH_KEY_DATA {
5897    type Message = MavMessage;
5898    const ID: u32 = 7u32;
5899    const NAME: &'static str = "AUTH_KEY";
5900    const EXTRA_CRC: u8 = 119u8;
5901    const ENCODED_LEN: usize = 32usize;
5902    fn deser(
5903        _version: MavlinkVersion,
5904        __input: &[u8],
5905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5906        let avail_len = __input.len();
5907        let mut payload_buf = [0; Self::ENCODED_LEN];
5908        let mut buf = if avail_len < Self::ENCODED_LEN {
5909            payload_buf[0..avail_len].copy_from_slice(__input);
5910            Bytes::new(&payload_buf)
5911        } else {
5912            Bytes::new(__input)
5913        };
5914        let mut __struct = Self::default();
5915        let mut tmp = [0_u8; 32usize];
5916        for v in &mut tmp {
5917            *v = buf.get_u8();
5918        }
5919        __struct.key = CharArray::new(tmp);
5920        Ok(__struct)
5921    }
5922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5923        let mut __tmp = BytesMut::new(bytes);
5924        #[allow(clippy::absurd_extreme_comparisons)]
5925        #[allow(unused_comparisons)]
5926        if __tmp.remaining() < Self::ENCODED_LEN {
5927            panic!(
5928                "buffer is too small (need {} bytes, but got {})",
5929                Self::ENCODED_LEN,
5930                __tmp.remaining(),
5931            )
5932        }
5933        for val in &self.key {
5934            __tmp.put_u8(*val);
5935        }
5936        if matches!(version, MavlinkVersion::V2) {
5937            let len = __tmp.len();
5938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5939        } else {
5940            __tmp.len()
5941        }
5942    }
5943}
5944#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5945#[doc = ""]
5946#[doc = "ID: 286"]
5947#[derive(Debug, Clone, PartialEq)]
5948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5950#[cfg_attr(feature = "ts", derive(TS))]
5951#[cfg_attr(feature = "ts", ts(export))]
5952pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5953    #[doc = "Timestamp (time since system boot)."]
5954    pub time_boot_us: u64,
5955    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5958    pub q: [f32; 4],
5959    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5960    pub q_estimated_delay_us: u32,
5961    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5962    pub vx: f32,
5963    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5964    pub vy: f32,
5965    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5966    pub vz: f32,
5967    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5968    pub v_estimated_delay_us: u32,
5969    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5970    pub feed_forward_angular_velocity_z: f32,
5971    #[doc = "Bitmap indicating which estimator outputs are valid."]
5972    pub estimator_status: EstimatorStatusFlags,
5973    #[doc = "System ID"]
5974    pub target_system: u8,
5975    #[doc = "Component ID"]
5976    pub target_component: u8,
5977    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5978    pub landed_state: MavLandedState,
5979    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5981    pub angular_velocity_z: f32,
5982}
5983impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5984    pub const ENCODED_LEN: usize = 57usize;
5985    pub const DEFAULT: Self = Self {
5986        time_boot_us: 0_u64,
5987        q: [0.0_f32; 4usize],
5988        q_estimated_delay_us: 0_u32,
5989        vx: 0.0_f32,
5990        vy: 0.0_f32,
5991        vz: 0.0_f32,
5992        v_estimated_delay_us: 0_u32,
5993        feed_forward_angular_velocity_z: 0.0_f32,
5994        estimator_status: EstimatorStatusFlags::DEFAULT,
5995        target_system: 0_u8,
5996        target_component: 0_u8,
5997        landed_state: MavLandedState::DEFAULT,
5998        angular_velocity_z: 0.0_f32,
5999    };
6000    #[cfg(feature = "arbitrary")]
6001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6002        use arbitrary::{Arbitrary, Unstructured};
6003        let mut buf = [0u8; 1024];
6004        rng.fill_bytes(&mut buf);
6005        let mut unstructured = Unstructured::new(&buf);
6006        Self::arbitrary(&mut unstructured).unwrap_or_default()
6007    }
6008}
6009impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6010    fn default() -> Self {
6011        Self::DEFAULT.clone()
6012    }
6013}
6014impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6015    type Message = MavMessage;
6016    const ID: u32 = 286u32;
6017    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6018    const EXTRA_CRC: u8 = 210u8;
6019    const ENCODED_LEN: usize = 57usize;
6020    fn deser(
6021        _version: MavlinkVersion,
6022        __input: &[u8],
6023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6024        let avail_len = __input.len();
6025        let mut payload_buf = [0; Self::ENCODED_LEN];
6026        let mut buf = if avail_len < Self::ENCODED_LEN {
6027            payload_buf[0..avail_len].copy_from_slice(__input);
6028            Bytes::new(&payload_buf)
6029        } else {
6030            Bytes::new(__input)
6031        };
6032        let mut __struct = Self::default();
6033        __struct.time_boot_us = buf.get_u64_le();
6034        for v in &mut __struct.q {
6035            let val = buf.get_f32_le();
6036            *v = val;
6037        }
6038        __struct.q_estimated_delay_us = buf.get_u32_le();
6039        __struct.vx = buf.get_f32_le();
6040        __struct.vy = buf.get_f32_le();
6041        __struct.vz = buf.get_f32_le();
6042        __struct.v_estimated_delay_us = buf.get_u32_le();
6043        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6044        let tmp = buf.get_u16_le();
6045        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6046            tmp & EstimatorStatusFlags::all().bits(),
6047        )
6048        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6049            flag_type: "EstimatorStatusFlags",
6050            value: tmp as u32,
6051        })?;
6052        __struct.target_system = buf.get_u8();
6053        __struct.target_component = buf.get_u8();
6054        let tmp = buf.get_u8();
6055        __struct.landed_state =
6056            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6057                enum_type: "MavLandedState",
6058                value: tmp as u32,
6059            })?;
6060        __struct.angular_velocity_z = buf.get_f32_le();
6061        Ok(__struct)
6062    }
6063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6064        let mut __tmp = BytesMut::new(bytes);
6065        #[allow(clippy::absurd_extreme_comparisons)]
6066        #[allow(unused_comparisons)]
6067        if __tmp.remaining() < Self::ENCODED_LEN {
6068            panic!(
6069                "buffer is too small (need {} bytes, but got {})",
6070                Self::ENCODED_LEN,
6071                __tmp.remaining(),
6072            )
6073        }
6074        __tmp.put_u64_le(self.time_boot_us);
6075        for val in &self.q {
6076            __tmp.put_f32_le(*val);
6077        }
6078        __tmp.put_u32_le(self.q_estimated_delay_us);
6079        __tmp.put_f32_le(self.vx);
6080        __tmp.put_f32_le(self.vy);
6081        __tmp.put_f32_le(self.vz);
6082        __tmp.put_u32_le(self.v_estimated_delay_us);
6083        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6084        __tmp.put_u16_le(self.estimator_status.bits());
6085        __tmp.put_u8(self.target_system);
6086        __tmp.put_u8(self.target_component);
6087        __tmp.put_u8(self.landed_state as u8);
6088        if matches!(version, MavlinkVersion::V2) {
6089            __tmp.put_f32_le(self.angular_velocity_z);
6090            let len = __tmp.len();
6091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6092        } else {
6093            __tmp.len()
6094        }
6095    }
6096}
6097#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6098#[doc = ""]
6099#[doc = "ID: 148"]
6100#[derive(Debug, Clone, PartialEq)]
6101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6103#[cfg_attr(feature = "ts", derive(TS))]
6104#[cfg_attr(feature = "ts", ts(export))]
6105pub struct AUTOPILOT_VERSION_DATA {
6106    #[doc = "Bitmap of capabilities"]
6107    pub capabilities: MavProtocolCapability,
6108    #[doc = "UID if provided by hardware (see uid2)"]
6109    pub uid: u64,
6110    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6111    pub flight_sw_version: u32,
6112    #[doc = "Middleware version number"]
6113    pub middleware_sw_version: u32,
6114    #[doc = "Operating system version number"]
6115    pub os_sw_version: u32,
6116    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6117    pub board_version: u32,
6118    #[doc = "ID of the board vendor"]
6119    pub vendor_id: u16,
6120    #[doc = "ID of the product"]
6121    pub product_id: u16,
6122    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6125    pub flight_custom_version: [u8; 8],
6126    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6129    pub middleware_custom_version: [u8; 8],
6130    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6132    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6133    pub os_custom_version: [u8; 8],
6134    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6135    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6136    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6137    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6138    pub uid2: [u8; 18],
6139}
6140impl AUTOPILOT_VERSION_DATA {
6141    pub const ENCODED_LEN: usize = 78usize;
6142    pub const DEFAULT: Self = Self {
6143        capabilities: MavProtocolCapability::DEFAULT,
6144        uid: 0_u64,
6145        flight_sw_version: 0_u32,
6146        middleware_sw_version: 0_u32,
6147        os_sw_version: 0_u32,
6148        board_version: 0_u32,
6149        vendor_id: 0_u16,
6150        product_id: 0_u16,
6151        flight_custom_version: [0_u8; 8usize],
6152        middleware_custom_version: [0_u8; 8usize],
6153        os_custom_version: [0_u8; 8usize],
6154        uid2: [0_u8; 18usize],
6155    };
6156    #[cfg(feature = "arbitrary")]
6157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6158        use arbitrary::{Arbitrary, Unstructured};
6159        let mut buf = [0u8; 1024];
6160        rng.fill_bytes(&mut buf);
6161        let mut unstructured = Unstructured::new(&buf);
6162        Self::arbitrary(&mut unstructured).unwrap_or_default()
6163    }
6164}
6165impl Default for AUTOPILOT_VERSION_DATA {
6166    fn default() -> Self {
6167        Self::DEFAULT.clone()
6168    }
6169}
6170impl MessageData for AUTOPILOT_VERSION_DATA {
6171    type Message = MavMessage;
6172    const ID: u32 = 148u32;
6173    const NAME: &'static str = "AUTOPILOT_VERSION";
6174    const EXTRA_CRC: u8 = 178u8;
6175    const ENCODED_LEN: usize = 78usize;
6176    fn deser(
6177        _version: MavlinkVersion,
6178        __input: &[u8],
6179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6180        let avail_len = __input.len();
6181        let mut payload_buf = [0; Self::ENCODED_LEN];
6182        let mut buf = if avail_len < Self::ENCODED_LEN {
6183            payload_buf[0..avail_len].copy_from_slice(__input);
6184            Bytes::new(&payload_buf)
6185        } else {
6186            Bytes::new(__input)
6187        };
6188        let mut __struct = Self::default();
6189        let tmp = buf.get_u64_le();
6190        __struct.capabilities = MavProtocolCapability::from_bits(
6191            tmp & MavProtocolCapability::all().bits(),
6192        )
6193        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6194            flag_type: "MavProtocolCapability",
6195            value: tmp as u32,
6196        })?;
6197        __struct.uid = buf.get_u64_le();
6198        __struct.flight_sw_version = buf.get_u32_le();
6199        __struct.middleware_sw_version = buf.get_u32_le();
6200        __struct.os_sw_version = buf.get_u32_le();
6201        __struct.board_version = buf.get_u32_le();
6202        __struct.vendor_id = buf.get_u16_le();
6203        __struct.product_id = buf.get_u16_le();
6204        for v in &mut __struct.flight_custom_version {
6205            let val = buf.get_u8();
6206            *v = val;
6207        }
6208        for v in &mut __struct.middleware_custom_version {
6209            let val = buf.get_u8();
6210            *v = val;
6211        }
6212        for v in &mut __struct.os_custom_version {
6213            let val = buf.get_u8();
6214            *v = val;
6215        }
6216        for v in &mut __struct.uid2 {
6217            let val = buf.get_u8();
6218            *v = val;
6219        }
6220        Ok(__struct)
6221    }
6222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6223        let mut __tmp = BytesMut::new(bytes);
6224        #[allow(clippy::absurd_extreme_comparisons)]
6225        #[allow(unused_comparisons)]
6226        if __tmp.remaining() < Self::ENCODED_LEN {
6227            panic!(
6228                "buffer is too small (need {} bytes, but got {})",
6229                Self::ENCODED_LEN,
6230                __tmp.remaining(),
6231            )
6232        }
6233        __tmp.put_u64_le(self.capabilities.bits());
6234        __tmp.put_u64_le(self.uid);
6235        __tmp.put_u32_le(self.flight_sw_version);
6236        __tmp.put_u32_le(self.middleware_sw_version);
6237        __tmp.put_u32_le(self.os_sw_version);
6238        __tmp.put_u32_le(self.board_version);
6239        __tmp.put_u16_le(self.vendor_id);
6240        __tmp.put_u16_le(self.product_id);
6241        for val in &self.flight_custom_version {
6242            __tmp.put_u8(*val);
6243        }
6244        for val in &self.middleware_custom_version {
6245            __tmp.put_u8(*val);
6246        }
6247        for val in &self.os_custom_version {
6248            __tmp.put_u8(*val);
6249        }
6250        if matches!(version, MavlinkVersion::V2) {
6251            for val in &self.uid2 {
6252                __tmp.put_u8(*val);
6253            }
6254            let len = __tmp.len();
6255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6256        } else {
6257            __tmp.len()
6258        }
6259    }
6260}
6261#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6262#[doc = ""]
6263#[doc = "ID: 435"]
6264#[derive(Debug, Clone, PartialEq)]
6265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6267#[cfg_attr(feature = "ts", derive(TS))]
6268#[cfg_attr(feature = "ts", ts(export))]
6269pub struct AVAILABLE_MODES_DATA {
6270    #[doc = "A bitfield for use for autopilot-specific flags"]
6271    pub custom_mode: u32,
6272    #[doc = "Mode properties."]
6273    pub properties: MavModeProperty,
6274    #[doc = "The total number of available modes for the current vehicle type."]
6275    pub number_modes: u8,
6276    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6277    pub mode_index: u8,
6278    #[doc = "Standard mode."]
6279    pub standard_mode: MavStandardMode,
6280    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6281    #[cfg_attr(feature = "ts", ts(type = "string"))]
6282    pub mode_name: CharArray<35>,
6283}
6284impl AVAILABLE_MODES_DATA {
6285    pub const ENCODED_LEN: usize = 46usize;
6286    pub const DEFAULT: Self = Self {
6287        custom_mode: 0_u32,
6288        properties: MavModeProperty::DEFAULT,
6289        number_modes: 0_u8,
6290        mode_index: 0_u8,
6291        standard_mode: MavStandardMode::DEFAULT,
6292        mode_name: CharArray::new([0_u8; 35usize]),
6293    };
6294    #[cfg(feature = "arbitrary")]
6295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6296        use arbitrary::{Arbitrary, Unstructured};
6297        let mut buf = [0u8; 1024];
6298        rng.fill_bytes(&mut buf);
6299        let mut unstructured = Unstructured::new(&buf);
6300        Self::arbitrary(&mut unstructured).unwrap_or_default()
6301    }
6302}
6303impl Default for AVAILABLE_MODES_DATA {
6304    fn default() -> Self {
6305        Self::DEFAULT.clone()
6306    }
6307}
6308impl MessageData for AVAILABLE_MODES_DATA {
6309    type Message = MavMessage;
6310    const ID: u32 = 435u32;
6311    const NAME: &'static str = "AVAILABLE_MODES";
6312    const EXTRA_CRC: u8 = 134u8;
6313    const ENCODED_LEN: usize = 46usize;
6314    fn deser(
6315        _version: MavlinkVersion,
6316        __input: &[u8],
6317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6318        let avail_len = __input.len();
6319        let mut payload_buf = [0; Self::ENCODED_LEN];
6320        let mut buf = if avail_len < Self::ENCODED_LEN {
6321            payload_buf[0..avail_len].copy_from_slice(__input);
6322            Bytes::new(&payload_buf)
6323        } else {
6324            Bytes::new(__input)
6325        };
6326        let mut __struct = Self::default();
6327        __struct.custom_mode = buf.get_u32_le();
6328        let tmp = buf.get_u32_le();
6329        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6330            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6331                flag_type: "MavModeProperty",
6332                value: tmp as u32,
6333            })?;
6334        __struct.number_modes = buf.get_u8();
6335        __struct.mode_index = buf.get_u8();
6336        let tmp = buf.get_u8();
6337        __struct.standard_mode =
6338            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6339                enum_type: "MavStandardMode",
6340                value: tmp as u32,
6341            })?;
6342        let mut tmp = [0_u8; 35usize];
6343        for v in &mut tmp {
6344            *v = buf.get_u8();
6345        }
6346        __struct.mode_name = CharArray::new(tmp);
6347        Ok(__struct)
6348    }
6349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6350        let mut __tmp = BytesMut::new(bytes);
6351        #[allow(clippy::absurd_extreme_comparisons)]
6352        #[allow(unused_comparisons)]
6353        if __tmp.remaining() < Self::ENCODED_LEN {
6354            panic!(
6355                "buffer is too small (need {} bytes, but got {})",
6356                Self::ENCODED_LEN,
6357                __tmp.remaining(),
6358            )
6359        }
6360        __tmp.put_u32_le(self.custom_mode);
6361        __tmp.put_u32_le(self.properties.bits());
6362        __tmp.put_u8(self.number_modes);
6363        __tmp.put_u8(self.mode_index);
6364        __tmp.put_u8(self.standard_mode as u8);
6365        for val in &self.mode_name {
6366            __tmp.put_u8(*val);
6367        }
6368        if matches!(version, MavlinkVersion::V2) {
6369            let len = __tmp.len();
6370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6371        } else {
6372            __tmp.len()
6373        }
6374    }
6375}
6376#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6377#[doc = ""]
6378#[doc = "ID: 437"]
6379#[derive(Debug, Clone, PartialEq)]
6380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6382#[cfg_attr(feature = "ts", derive(TS))]
6383#[cfg_attr(feature = "ts", ts(export))]
6384pub struct AVAILABLE_MODES_MONITOR_DATA {
6385    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6386    pub seq: u8,
6387}
6388impl AVAILABLE_MODES_MONITOR_DATA {
6389    pub const ENCODED_LEN: usize = 1usize;
6390    pub const DEFAULT: Self = Self { seq: 0_u8 };
6391    #[cfg(feature = "arbitrary")]
6392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6393        use arbitrary::{Arbitrary, Unstructured};
6394        let mut buf = [0u8; 1024];
6395        rng.fill_bytes(&mut buf);
6396        let mut unstructured = Unstructured::new(&buf);
6397        Self::arbitrary(&mut unstructured).unwrap_or_default()
6398    }
6399}
6400impl Default for AVAILABLE_MODES_MONITOR_DATA {
6401    fn default() -> Self {
6402        Self::DEFAULT.clone()
6403    }
6404}
6405impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6406    type Message = MavMessage;
6407    const ID: u32 = 437u32;
6408    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6409    const EXTRA_CRC: u8 = 30u8;
6410    const ENCODED_LEN: usize = 1usize;
6411    fn deser(
6412        _version: MavlinkVersion,
6413        __input: &[u8],
6414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6415        let avail_len = __input.len();
6416        let mut payload_buf = [0; Self::ENCODED_LEN];
6417        let mut buf = if avail_len < Self::ENCODED_LEN {
6418            payload_buf[0..avail_len].copy_from_slice(__input);
6419            Bytes::new(&payload_buf)
6420        } else {
6421            Bytes::new(__input)
6422        };
6423        let mut __struct = Self::default();
6424        __struct.seq = buf.get_u8();
6425        Ok(__struct)
6426    }
6427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6428        let mut __tmp = BytesMut::new(bytes);
6429        #[allow(clippy::absurd_extreme_comparisons)]
6430        #[allow(unused_comparisons)]
6431        if __tmp.remaining() < Self::ENCODED_LEN {
6432            panic!(
6433                "buffer is too small (need {} bytes, but got {})",
6434                Self::ENCODED_LEN,
6435                __tmp.remaining(),
6436            )
6437        }
6438        __tmp.put_u8(self.seq);
6439        if matches!(version, MavlinkVersion::V2) {
6440            let len = __tmp.len();
6441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6442        } else {
6443            __tmp.len()
6444        }
6445    }
6446}
6447#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6448#[doc = ""]
6449#[doc = "ID: 372"]
6450#[derive(Debug, Clone, PartialEq)]
6451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6453#[cfg_attr(feature = "ts", derive(TS))]
6454#[cfg_attr(feature = "ts", ts(export))]
6455pub struct BATTERY_INFO_DATA {
6456    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6457    pub discharge_minimum_voltage: f32,
6458    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6459    pub charging_minimum_voltage: f32,
6460    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6461    pub resting_minimum_voltage: f32,
6462    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6463    pub charging_maximum_voltage: f32,
6464    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6465    pub charging_maximum_current: f32,
6466    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6467    pub nominal_voltage: f32,
6468    #[doc = "Maximum pack discharge current. 0: field not provided."]
6469    pub discharge_maximum_current: f32,
6470    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6471    pub discharge_maximum_burst_current: f32,
6472    #[doc = "Fully charged design capacity. 0: field not provided."]
6473    pub design_capacity: f32,
6474    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6475    pub full_charge_capacity: f32,
6476    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6477    pub cycle_count: u16,
6478    #[doc = "Battery weight. 0: field not provided."]
6479    pub weight: u16,
6480    #[doc = "Battery ID"]
6481    pub id: u8,
6482    #[doc = "Function of the battery."]
6483    pub battery_function: MavBatteryFunction,
6484    #[doc = "Type (chemistry) of the battery."]
6485    pub mavtype: MavBatteryType,
6486    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6487    pub state_of_health: u8,
6488    #[doc = "Number of battery cells in series. 0: field not provided."]
6489    pub cells_in_series: u8,
6490    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6491    #[cfg_attr(feature = "ts", ts(type = "string"))]
6492    pub manufacture_date: CharArray<9>,
6493    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6494    #[cfg_attr(feature = "ts", ts(type = "string"))]
6495    pub serial_number: CharArray<32>,
6496    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6497    #[cfg_attr(feature = "ts", ts(type = "string"))]
6498    pub name: CharArray<50>,
6499}
6500impl BATTERY_INFO_DATA {
6501    pub const ENCODED_LEN: usize = 140usize;
6502    pub const DEFAULT: Self = Self {
6503        discharge_minimum_voltage: 0.0_f32,
6504        charging_minimum_voltage: 0.0_f32,
6505        resting_minimum_voltage: 0.0_f32,
6506        charging_maximum_voltage: 0.0_f32,
6507        charging_maximum_current: 0.0_f32,
6508        nominal_voltage: 0.0_f32,
6509        discharge_maximum_current: 0.0_f32,
6510        discharge_maximum_burst_current: 0.0_f32,
6511        design_capacity: 0.0_f32,
6512        full_charge_capacity: 0.0_f32,
6513        cycle_count: 0_u16,
6514        weight: 0_u16,
6515        id: 0_u8,
6516        battery_function: MavBatteryFunction::DEFAULT,
6517        mavtype: MavBatteryType::DEFAULT,
6518        state_of_health: 0_u8,
6519        cells_in_series: 0_u8,
6520        manufacture_date: CharArray::new([0_u8; 9usize]),
6521        serial_number: CharArray::new([0_u8; 32usize]),
6522        name: CharArray::new([0_u8; 50usize]),
6523    };
6524    #[cfg(feature = "arbitrary")]
6525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6526        use arbitrary::{Arbitrary, Unstructured};
6527        let mut buf = [0u8; 1024];
6528        rng.fill_bytes(&mut buf);
6529        let mut unstructured = Unstructured::new(&buf);
6530        Self::arbitrary(&mut unstructured).unwrap_or_default()
6531    }
6532}
6533impl Default for BATTERY_INFO_DATA {
6534    fn default() -> Self {
6535        Self::DEFAULT.clone()
6536    }
6537}
6538impl MessageData for BATTERY_INFO_DATA {
6539    type Message = MavMessage;
6540    const ID: u32 = 372u32;
6541    const NAME: &'static str = "BATTERY_INFO";
6542    const EXTRA_CRC: u8 = 26u8;
6543    const ENCODED_LEN: usize = 140usize;
6544    fn deser(
6545        _version: MavlinkVersion,
6546        __input: &[u8],
6547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6548        let avail_len = __input.len();
6549        let mut payload_buf = [0; Self::ENCODED_LEN];
6550        let mut buf = if avail_len < Self::ENCODED_LEN {
6551            payload_buf[0..avail_len].copy_from_slice(__input);
6552            Bytes::new(&payload_buf)
6553        } else {
6554            Bytes::new(__input)
6555        };
6556        let mut __struct = Self::default();
6557        __struct.discharge_minimum_voltage = buf.get_f32_le();
6558        __struct.charging_minimum_voltage = buf.get_f32_le();
6559        __struct.resting_minimum_voltage = buf.get_f32_le();
6560        __struct.charging_maximum_voltage = buf.get_f32_le();
6561        __struct.charging_maximum_current = buf.get_f32_le();
6562        __struct.nominal_voltage = buf.get_f32_le();
6563        __struct.discharge_maximum_current = buf.get_f32_le();
6564        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6565        __struct.design_capacity = buf.get_f32_le();
6566        __struct.full_charge_capacity = buf.get_f32_le();
6567        __struct.cycle_count = buf.get_u16_le();
6568        __struct.weight = buf.get_u16_le();
6569        __struct.id = buf.get_u8();
6570        let tmp = buf.get_u8();
6571        __struct.battery_function =
6572            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6573                enum_type: "MavBatteryFunction",
6574                value: tmp as u32,
6575            })?;
6576        let tmp = buf.get_u8();
6577        __struct.mavtype =
6578            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6579                enum_type: "MavBatteryType",
6580                value: tmp as u32,
6581            })?;
6582        __struct.state_of_health = buf.get_u8();
6583        __struct.cells_in_series = buf.get_u8();
6584        let mut tmp = [0_u8; 9usize];
6585        for v in &mut tmp {
6586            *v = buf.get_u8();
6587        }
6588        __struct.manufacture_date = CharArray::new(tmp);
6589        let mut tmp = [0_u8; 32usize];
6590        for v in &mut tmp {
6591            *v = buf.get_u8();
6592        }
6593        __struct.serial_number = CharArray::new(tmp);
6594        let mut tmp = [0_u8; 50usize];
6595        for v in &mut tmp {
6596            *v = buf.get_u8();
6597        }
6598        __struct.name = CharArray::new(tmp);
6599        Ok(__struct)
6600    }
6601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6602        let mut __tmp = BytesMut::new(bytes);
6603        #[allow(clippy::absurd_extreme_comparisons)]
6604        #[allow(unused_comparisons)]
6605        if __tmp.remaining() < Self::ENCODED_LEN {
6606            panic!(
6607                "buffer is too small (need {} bytes, but got {})",
6608                Self::ENCODED_LEN,
6609                __tmp.remaining(),
6610            )
6611        }
6612        __tmp.put_f32_le(self.discharge_minimum_voltage);
6613        __tmp.put_f32_le(self.charging_minimum_voltage);
6614        __tmp.put_f32_le(self.resting_minimum_voltage);
6615        __tmp.put_f32_le(self.charging_maximum_voltage);
6616        __tmp.put_f32_le(self.charging_maximum_current);
6617        __tmp.put_f32_le(self.nominal_voltage);
6618        __tmp.put_f32_le(self.discharge_maximum_current);
6619        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6620        __tmp.put_f32_le(self.design_capacity);
6621        __tmp.put_f32_le(self.full_charge_capacity);
6622        __tmp.put_u16_le(self.cycle_count);
6623        __tmp.put_u16_le(self.weight);
6624        __tmp.put_u8(self.id);
6625        __tmp.put_u8(self.battery_function as u8);
6626        __tmp.put_u8(self.mavtype as u8);
6627        __tmp.put_u8(self.state_of_health);
6628        __tmp.put_u8(self.cells_in_series);
6629        for val in &self.manufacture_date {
6630            __tmp.put_u8(*val);
6631        }
6632        for val in &self.serial_number {
6633            __tmp.put_u8(*val);
6634        }
6635        for val in &self.name {
6636            __tmp.put_u8(*val);
6637        }
6638        if matches!(version, MavlinkVersion::V2) {
6639            let len = __tmp.len();
6640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6641        } else {
6642            __tmp.len()
6643        }
6644    }
6645}
6646#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6647#[doc = ""]
6648#[doc = "ID: 147"]
6649#[derive(Debug, Clone, PartialEq)]
6650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6652#[cfg_attr(feature = "ts", derive(TS))]
6653#[cfg_attr(feature = "ts", ts(export))]
6654pub struct BATTERY_STATUS_DATA {
6655    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6656    pub current_consumed: i32,
6657    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6658    pub energy_consumed: i32,
6659    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6660    pub temperature: i16,
6661    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6662    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6663    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6664    pub voltages: [u16; 10],
6665    #[doc = "Battery current, -1: autopilot does not measure the current"]
6666    pub current_battery: i16,
6667    #[doc = "Battery ID"]
6668    pub id: u8,
6669    #[doc = "Function of the battery"]
6670    pub battery_function: MavBatteryFunction,
6671    #[doc = "Type (chemistry) of the battery"]
6672    pub mavtype: MavBatteryType,
6673    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6674    pub battery_remaining: i8,
6675    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6677    pub time_remaining: i32,
6678    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6679    #[cfg_attr(feature = "serde", serde(default))]
6680    pub charge_state: MavBatteryChargeState,
6681    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6685    pub voltages_ext: [u16; 4],
6686    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6687    #[cfg_attr(feature = "serde", serde(default))]
6688    pub mode: MavBatteryMode,
6689    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6690    #[cfg_attr(feature = "serde", serde(default))]
6691    pub fault_bitmask: MavBatteryFault,
6692}
6693impl BATTERY_STATUS_DATA {
6694    pub const ENCODED_LEN: usize = 54usize;
6695    pub const DEFAULT: Self = Self {
6696        current_consumed: 0_i32,
6697        energy_consumed: 0_i32,
6698        temperature: 0_i16,
6699        voltages: [0_u16; 10usize],
6700        current_battery: 0_i16,
6701        id: 0_u8,
6702        battery_function: MavBatteryFunction::DEFAULT,
6703        mavtype: MavBatteryType::DEFAULT,
6704        battery_remaining: 0_i8,
6705        time_remaining: 0_i32,
6706        charge_state: MavBatteryChargeState::DEFAULT,
6707        voltages_ext: [0_u16; 4usize],
6708        mode: MavBatteryMode::DEFAULT,
6709        fault_bitmask: MavBatteryFault::DEFAULT,
6710    };
6711    #[cfg(feature = "arbitrary")]
6712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6713        use arbitrary::{Arbitrary, Unstructured};
6714        let mut buf = [0u8; 1024];
6715        rng.fill_bytes(&mut buf);
6716        let mut unstructured = Unstructured::new(&buf);
6717        Self::arbitrary(&mut unstructured).unwrap_or_default()
6718    }
6719}
6720impl Default for BATTERY_STATUS_DATA {
6721    fn default() -> Self {
6722        Self::DEFAULT.clone()
6723    }
6724}
6725impl MessageData for BATTERY_STATUS_DATA {
6726    type Message = MavMessage;
6727    const ID: u32 = 147u32;
6728    const NAME: &'static str = "BATTERY_STATUS";
6729    const EXTRA_CRC: u8 = 154u8;
6730    const ENCODED_LEN: usize = 54usize;
6731    fn deser(
6732        _version: MavlinkVersion,
6733        __input: &[u8],
6734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6735        let avail_len = __input.len();
6736        let mut payload_buf = [0; Self::ENCODED_LEN];
6737        let mut buf = if avail_len < Self::ENCODED_LEN {
6738            payload_buf[0..avail_len].copy_from_slice(__input);
6739            Bytes::new(&payload_buf)
6740        } else {
6741            Bytes::new(__input)
6742        };
6743        let mut __struct = Self::default();
6744        __struct.current_consumed = buf.get_i32_le();
6745        __struct.energy_consumed = buf.get_i32_le();
6746        __struct.temperature = buf.get_i16_le();
6747        for v in &mut __struct.voltages {
6748            let val = buf.get_u16_le();
6749            *v = val;
6750        }
6751        __struct.current_battery = buf.get_i16_le();
6752        __struct.id = buf.get_u8();
6753        let tmp = buf.get_u8();
6754        __struct.battery_function =
6755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6756                enum_type: "MavBatteryFunction",
6757                value: tmp as u32,
6758            })?;
6759        let tmp = buf.get_u8();
6760        __struct.mavtype =
6761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6762                enum_type: "MavBatteryType",
6763                value: tmp as u32,
6764            })?;
6765        __struct.battery_remaining = buf.get_i8();
6766        __struct.time_remaining = buf.get_i32_le();
6767        let tmp = buf.get_u8();
6768        __struct.charge_state =
6769            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6770                enum_type: "MavBatteryChargeState",
6771                value: tmp as u32,
6772            })?;
6773        for v in &mut __struct.voltages_ext {
6774            let val = buf.get_u16_le();
6775            *v = val;
6776        }
6777        let tmp = buf.get_u8();
6778        __struct.mode =
6779            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6780                enum_type: "MavBatteryMode",
6781                value: tmp as u32,
6782            })?;
6783        let tmp = buf.get_u32_le();
6784        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6785            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6786                flag_type: "MavBatteryFault",
6787                value: tmp as u32,
6788            })?;
6789        Ok(__struct)
6790    }
6791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6792        let mut __tmp = BytesMut::new(bytes);
6793        #[allow(clippy::absurd_extreme_comparisons)]
6794        #[allow(unused_comparisons)]
6795        if __tmp.remaining() < Self::ENCODED_LEN {
6796            panic!(
6797                "buffer is too small (need {} bytes, but got {})",
6798                Self::ENCODED_LEN,
6799                __tmp.remaining(),
6800            )
6801        }
6802        __tmp.put_i32_le(self.current_consumed);
6803        __tmp.put_i32_le(self.energy_consumed);
6804        __tmp.put_i16_le(self.temperature);
6805        for val in &self.voltages {
6806            __tmp.put_u16_le(*val);
6807        }
6808        __tmp.put_i16_le(self.current_battery);
6809        __tmp.put_u8(self.id);
6810        __tmp.put_u8(self.battery_function as u8);
6811        __tmp.put_u8(self.mavtype as u8);
6812        __tmp.put_i8(self.battery_remaining);
6813        if matches!(version, MavlinkVersion::V2) {
6814            __tmp.put_i32_le(self.time_remaining);
6815            __tmp.put_u8(self.charge_state as u8);
6816            for val in &self.voltages_ext {
6817                __tmp.put_u16_le(*val);
6818            }
6819            __tmp.put_u8(self.mode as u8);
6820            __tmp.put_u32_le(self.fault_bitmask.bits());
6821            let len = __tmp.len();
6822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6823        } else {
6824            __tmp.len()
6825        }
6826    }
6827}
6828#[doc = "Report button state change."]
6829#[doc = ""]
6830#[doc = "ID: 257"]
6831#[derive(Debug, Clone, PartialEq)]
6832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6834#[cfg_attr(feature = "ts", derive(TS))]
6835#[cfg_attr(feature = "ts", ts(export))]
6836pub struct BUTTON_CHANGE_DATA {
6837    #[doc = "Timestamp (time since system boot)."]
6838    pub time_boot_ms: u32,
6839    #[doc = "Time of last change of button state."]
6840    pub last_change_ms: u32,
6841    #[doc = "Bitmap for state of buttons."]
6842    pub state: u8,
6843}
6844impl BUTTON_CHANGE_DATA {
6845    pub const ENCODED_LEN: usize = 9usize;
6846    pub const DEFAULT: Self = Self {
6847        time_boot_ms: 0_u32,
6848        last_change_ms: 0_u32,
6849        state: 0_u8,
6850    };
6851    #[cfg(feature = "arbitrary")]
6852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6853        use arbitrary::{Arbitrary, Unstructured};
6854        let mut buf = [0u8; 1024];
6855        rng.fill_bytes(&mut buf);
6856        let mut unstructured = Unstructured::new(&buf);
6857        Self::arbitrary(&mut unstructured).unwrap_or_default()
6858    }
6859}
6860impl Default for BUTTON_CHANGE_DATA {
6861    fn default() -> Self {
6862        Self::DEFAULT.clone()
6863    }
6864}
6865impl MessageData for BUTTON_CHANGE_DATA {
6866    type Message = MavMessage;
6867    const ID: u32 = 257u32;
6868    const NAME: &'static str = "BUTTON_CHANGE";
6869    const EXTRA_CRC: u8 = 131u8;
6870    const ENCODED_LEN: usize = 9usize;
6871    fn deser(
6872        _version: MavlinkVersion,
6873        __input: &[u8],
6874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6875        let avail_len = __input.len();
6876        let mut payload_buf = [0; Self::ENCODED_LEN];
6877        let mut buf = if avail_len < Self::ENCODED_LEN {
6878            payload_buf[0..avail_len].copy_from_slice(__input);
6879            Bytes::new(&payload_buf)
6880        } else {
6881            Bytes::new(__input)
6882        };
6883        let mut __struct = Self::default();
6884        __struct.time_boot_ms = buf.get_u32_le();
6885        __struct.last_change_ms = buf.get_u32_le();
6886        __struct.state = buf.get_u8();
6887        Ok(__struct)
6888    }
6889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6890        let mut __tmp = BytesMut::new(bytes);
6891        #[allow(clippy::absurd_extreme_comparisons)]
6892        #[allow(unused_comparisons)]
6893        if __tmp.remaining() < Self::ENCODED_LEN {
6894            panic!(
6895                "buffer is too small (need {} bytes, but got {})",
6896                Self::ENCODED_LEN,
6897                __tmp.remaining(),
6898            )
6899        }
6900        __tmp.put_u32_le(self.time_boot_ms);
6901        __tmp.put_u32_le(self.last_change_ms);
6902        __tmp.put_u8(self.state);
6903        if matches!(version, MavlinkVersion::V2) {
6904            let len = __tmp.len();
6905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6906        } else {
6907            __tmp.len()
6908        }
6909    }
6910}
6911#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6912#[doc = ""]
6913#[doc = "ID: 262"]
6914#[derive(Debug, Clone, PartialEq)]
6915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6917#[cfg_attr(feature = "ts", derive(TS))]
6918#[cfg_attr(feature = "ts", ts(export))]
6919pub struct CAMERA_CAPTURE_STATUS_DATA {
6920    #[doc = "Timestamp (time since system boot)."]
6921    pub time_boot_ms: u32,
6922    #[doc = "Image capture interval"]
6923    pub image_interval: f32,
6924    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6925    pub recording_time_ms: u32,
6926    #[doc = "Available storage capacity."]
6927    pub available_capacity: f32,
6928    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6929    pub image_status: u8,
6930    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6931    pub video_status: u8,
6932    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6934    pub image_count: i32,
6935    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6937    pub camera_device_id: u8,
6938}
6939impl CAMERA_CAPTURE_STATUS_DATA {
6940    pub const ENCODED_LEN: usize = 23usize;
6941    pub const DEFAULT: Self = Self {
6942        time_boot_ms: 0_u32,
6943        image_interval: 0.0_f32,
6944        recording_time_ms: 0_u32,
6945        available_capacity: 0.0_f32,
6946        image_status: 0_u8,
6947        video_status: 0_u8,
6948        image_count: 0_i32,
6949        camera_device_id: 0_u8,
6950    };
6951    #[cfg(feature = "arbitrary")]
6952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6953        use arbitrary::{Arbitrary, Unstructured};
6954        let mut buf = [0u8; 1024];
6955        rng.fill_bytes(&mut buf);
6956        let mut unstructured = Unstructured::new(&buf);
6957        Self::arbitrary(&mut unstructured).unwrap_or_default()
6958    }
6959}
6960impl Default for CAMERA_CAPTURE_STATUS_DATA {
6961    fn default() -> Self {
6962        Self::DEFAULT.clone()
6963    }
6964}
6965impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6966    type Message = MavMessage;
6967    const ID: u32 = 262u32;
6968    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6969    const EXTRA_CRC: u8 = 12u8;
6970    const ENCODED_LEN: usize = 23usize;
6971    fn deser(
6972        _version: MavlinkVersion,
6973        __input: &[u8],
6974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6975        let avail_len = __input.len();
6976        let mut payload_buf = [0; Self::ENCODED_LEN];
6977        let mut buf = if avail_len < Self::ENCODED_LEN {
6978            payload_buf[0..avail_len].copy_from_slice(__input);
6979            Bytes::new(&payload_buf)
6980        } else {
6981            Bytes::new(__input)
6982        };
6983        let mut __struct = Self::default();
6984        __struct.time_boot_ms = buf.get_u32_le();
6985        __struct.image_interval = buf.get_f32_le();
6986        __struct.recording_time_ms = buf.get_u32_le();
6987        __struct.available_capacity = buf.get_f32_le();
6988        __struct.image_status = buf.get_u8();
6989        __struct.video_status = buf.get_u8();
6990        __struct.image_count = buf.get_i32_le();
6991        __struct.camera_device_id = buf.get_u8();
6992        Ok(__struct)
6993    }
6994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6995        let mut __tmp = BytesMut::new(bytes);
6996        #[allow(clippy::absurd_extreme_comparisons)]
6997        #[allow(unused_comparisons)]
6998        if __tmp.remaining() < Self::ENCODED_LEN {
6999            panic!(
7000                "buffer is too small (need {} bytes, but got {})",
7001                Self::ENCODED_LEN,
7002                __tmp.remaining(),
7003            )
7004        }
7005        __tmp.put_u32_le(self.time_boot_ms);
7006        __tmp.put_f32_le(self.image_interval);
7007        __tmp.put_u32_le(self.recording_time_ms);
7008        __tmp.put_f32_le(self.available_capacity);
7009        __tmp.put_u8(self.image_status);
7010        __tmp.put_u8(self.video_status);
7011        if matches!(version, MavlinkVersion::V2) {
7012            __tmp.put_i32_le(self.image_count);
7013            __tmp.put_u8(self.camera_device_id);
7014            let len = __tmp.len();
7015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7016        } else {
7017            __tmp.len()
7018        }
7019    }
7020}
7021#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7022#[doc = ""]
7023#[doc = "ID: 271"]
7024#[derive(Debug, Clone, PartialEq)]
7025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7027#[cfg_attr(feature = "ts", derive(TS))]
7028#[cfg_attr(feature = "ts", ts(export))]
7029pub struct CAMERA_FOV_STATUS_DATA {
7030    #[doc = "Timestamp (time since system boot)."]
7031    pub time_boot_ms: u32,
7032    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7033    pub lat_camera: i32,
7034    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7035    pub lon_camera: i32,
7036    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7037    pub alt_camera: i32,
7038    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7039    pub lat_image: i32,
7040    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7041    pub lon_image: i32,
7042    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7043    pub alt_image: i32,
7044    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7047    pub q: [f32; 4],
7048    #[doc = "Horizontal field of view (NaN if unknown)."]
7049    pub hfov: f32,
7050    #[doc = "Vertical field of view (NaN if unknown)."]
7051    pub vfov: f32,
7052    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7054    pub camera_device_id: u8,
7055}
7056impl CAMERA_FOV_STATUS_DATA {
7057    pub const ENCODED_LEN: usize = 53usize;
7058    pub const DEFAULT: Self = Self {
7059        time_boot_ms: 0_u32,
7060        lat_camera: 0_i32,
7061        lon_camera: 0_i32,
7062        alt_camera: 0_i32,
7063        lat_image: 0_i32,
7064        lon_image: 0_i32,
7065        alt_image: 0_i32,
7066        q: [0.0_f32; 4usize],
7067        hfov: 0.0_f32,
7068        vfov: 0.0_f32,
7069        camera_device_id: 0_u8,
7070    };
7071    #[cfg(feature = "arbitrary")]
7072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7073        use arbitrary::{Arbitrary, Unstructured};
7074        let mut buf = [0u8; 1024];
7075        rng.fill_bytes(&mut buf);
7076        let mut unstructured = Unstructured::new(&buf);
7077        Self::arbitrary(&mut unstructured).unwrap_or_default()
7078    }
7079}
7080impl Default for CAMERA_FOV_STATUS_DATA {
7081    fn default() -> Self {
7082        Self::DEFAULT.clone()
7083    }
7084}
7085impl MessageData for CAMERA_FOV_STATUS_DATA {
7086    type Message = MavMessage;
7087    const ID: u32 = 271u32;
7088    const NAME: &'static str = "CAMERA_FOV_STATUS";
7089    const EXTRA_CRC: u8 = 22u8;
7090    const ENCODED_LEN: usize = 53usize;
7091    fn deser(
7092        _version: MavlinkVersion,
7093        __input: &[u8],
7094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7095        let avail_len = __input.len();
7096        let mut payload_buf = [0; Self::ENCODED_LEN];
7097        let mut buf = if avail_len < Self::ENCODED_LEN {
7098            payload_buf[0..avail_len].copy_from_slice(__input);
7099            Bytes::new(&payload_buf)
7100        } else {
7101            Bytes::new(__input)
7102        };
7103        let mut __struct = Self::default();
7104        __struct.time_boot_ms = buf.get_u32_le();
7105        __struct.lat_camera = buf.get_i32_le();
7106        __struct.lon_camera = buf.get_i32_le();
7107        __struct.alt_camera = buf.get_i32_le();
7108        __struct.lat_image = buf.get_i32_le();
7109        __struct.lon_image = buf.get_i32_le();
7110        __struct.alt_image = buf.get_i32_le();
7111        for v in &mut __struct.q {
7112            let val = buf.get_f32_le();
7113            *v = val;
7114        }
7115        __struct.hfov = buf.get_f32_le();
7116        __struct.vfov = buf.get_f32_le();
7117        __struct.camera_device_id = buf.get_u8();
7118        Ok(__struct)
7119    }
7120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7121        let mut __tmp = BytesMut::new(bytes);
7122        #[allow(clippy::absurd_extreme_comparisons)]
7123        #[allow(unused_comparisons)]
7124        if __tmp.remaining() < Self::ENCODED_LEN {
7125            panic!(
7126                "buffer is too small (need {} bytes, but got {})",
7127                Self::ENCODED_LEN,
7128                __tmp.remaining(),
7129            )
7130        }
7131        __tmp.put_u32_le(self.time_boot_ms);
7132        __tmp.put_i32_le(self.lat_camera);
7133        __tmp.put_i32_le(self.lon_camera);
7134        __tmp.put_i32_le(self.alt_camera);
7135        __tmp.put_i32_le(self.lat_image);
7136        __tmp.put_i32_le(self.lon_image);
7137        __tmp.put_i32_le(self.alt_image);
7138        for val in &self.q {
7139            __tmp.put_f32_le(*val);
7140        }
7141        __tmp.put_f32_le(self.hfov);
7142        __tmp.put_f32_le(self.vfov);
7143        if matches!(version, MavlinkVersion::V2) {
7144            __tmp.put_u8(self.camera_device_id);
7145            let len = __tmp.len();
7146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7147        } else {
7148            __tmp.len()
7149        }
7150    }
7151}
7152#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7153#[doc = ""]
7154#[doc = "ID: 263"]
7155#[derive(Debug, Clone, PartialEq)]
7156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7158#[cfg_attr(feature = "ts", derive(TS))]
7159#[cfg_attr(feature = "ts", ts(export))]
7160pub struct CAMERA_IMAGE_CAPTURED_DATA {
7161    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7162    pub time_utc: u64,
7163    #[doc = "Timestamp (time since system boot)."]
7164    pub time_boot_ms: u32,
7165    #[doc = "Latitude where image was taken"]
7166    pub lat: i32,
7167    #[doc = "Longitude where capture was taken"]
7168    pub lon: i32,
7169    #[doc = "Altitude (MSL) where image was taken"]
7170    pub alt: i32,
7171    #[doc = "Altitude above ground"]
7172    pub relative_alt: i32,
7173    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7176    pub q: [f32; 4],
7177    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7178    pub image_index: i32,
7179    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7180    pub camera_id: u8,
7181    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7182    pub capture_result: i8,
7183    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7184    #[cfg_attr(feature = "ts", ts(type = "string"))]
7185    pub file_url: CharArray<205>,
7186}
7187impl CAMERA_IMAGE_CAPTURED_DATA {
7188    pub const ENCODED_LEN: usize = 255usize;
7189    pub const DEFAULT: Self = Self {
7190        time_utc: 0_u64,
7191        time_boot_ms: 0_u32,
7192        lat: 0_i32,
7193        lon: 0_i32,
7194        alt: 0_i32,
7195        relative_alt: 0_i32,
7196        q: [0.0_f32; 4usize],
7197        image_index: 0_i32,
7198        camera_id: 0_u8,
7199        capture_result: 0_i8,
7200        file_url: CharArray::new([0_u8; 205usize]),
7201    };
7202    #[cfg(feature = "arbitrary")]
7203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7204        use arbitrary::{Arbitrary, Unstructured};
7205        let mut buf = [0u8; 1024];
7206        rng.fill_bytes(&mut buf);
7207        let mut unstructured = Unstructured::new(&buf);
7208        Self::arbitrary(&mut unstructured).unwrap_or_default()
7209    }
7210}
7211impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7212    fn default() -> Self {
7213        Self::DEFAULT.clone()
7214    }
7215}
7216impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7217    type Message = MavMessage;
7218    const ID: u32 = 263u32;
7219    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7220    const EXTRA_CRC: u8 = 133u8;
7221    const ENCODED_LEN: usize = 255usize;
7222    fn deser(
7223        _version: MavlinkVersion,
7224        __input: &[u8],
7225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7226        let avail_len = __input.len();
7227        let mut payload_buf = [0; Self::ENCODED_LEN];
7228        let mut buf = if avail_len < Self::ENCODED_LEN {
7229            payload_buf[0..avail_len].copy_from_slice(__input);
7230            Bytes::new(&payload_buf)
7231        } else {
7232            Bytes::new(__input)
7233        };
7234        let mut __struct = Self::default();
7235        __struct.time_utc = buf.get_u64_le();
7236        __struct.time_boot_ms = buf.get_u32_le();
7237        __struct.lat = buf.get_i32_le();
7238        __struct.lon = buf.get_i32_le();
7239        __struct.alt = buf.get_i32_le();
7240        __struct.relative_alt = buf.get_i32_le();
7241        for v in &mut __struct.q {
7242            let val = buf.get_f32_le();
7243            *v = val;
7244        }
7245        __struct.image_index = buf.get_i32_le();
7246        __struct.camera_id = buf.get_u8();
7247        __struct.capture_result = buf.get_i8();
7248        let mut tmp = [0_u8; 205usize];
7249        for v in &mut tmp {
7250            *v = buf.get_u8();
7251        }
7252        __struct.file_url = CharArray::new(tmp);
7253        Ok(__struct)
7254    }
7255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7256        let mut __tmp = BytesMut::new(bytes);
7257        #[allow(clippy::absurd_extreme_comparisons)]
7258        #[allow(unused_comparisons)]
7259        if __tmp.remaining() < Self::ENCODED_LEN {
7260            panic!(
7261                "buffer is too small (need {} bytes, but got {})",
7262                Self::ENCODED_LEN,
7263                __tmp.remaining(),
7264            )
7265        }
7266        __tmp.put_u64_le(self.time_utc);
7267        __tmp.put_u32_le(self.time_boot_ms);
7268        __tmp.put_i32_le(self.lat);
7269        __tmp.put_i32_le(self.lon);
7270        __tmp.put_i32_le(self.alt);
7271        __tmp.put_i32_le(self.relative_alt);
7272        for val in &self.q {
7273            __tmp.put_f32_le(*val);
7274        }
7275        __tmp.put_i32_le(self.image_index);
7276        __tmp.put_u8(self.camera_id);
7277        __tmp.put_i8(self.capture_result);
7278        for val in &self.file_url {
7279            __tmp.put_u8(*val);
7280        }
7281        if matches!(version, MavlinkVersion::V2) {
7282            let len = __tmp.len();
7283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7284        } else {
7285            __tmp.len()
7286        }
7287    }
7288}
7289#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7290#[doc = ""]
7291#[doc = "ID: 259"]
7292#[derive(Debug, Clone, PartialEq)]
7293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7295#[cfg_attr(feature = "ts", derive(TS))]
7296#[cfg_attr(feature = "ts", ts(export))]
7297pub struct CAMERA_INFORMATION_DATA {
7298    #[doc = "Timestamp (time since system boot)."]
7299    pub time_boot_ms: u32,
7300    #[doc = "0xff). Use 0 if not known."]
7301    pub firmware_version: u32,
7302    #[doc = "Focal length. Use NaN if not known."]
7303    pub focal_length: f32,
7304    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7305    pub sensor_size_h: f32,
7306    #[doc = "Image sensor size vertical. Use NaN if not known."]
7307    pub sensor_size_v: f32,
7308    #[doc = "Bitmap of camera capability flags."]
7309    pub flags: CameraCapFlags,
7310    #[doc = "Horizontal image resolution. Use 0 if not known."]
7311    pub resolution_h: u16,
7312    #[doc = "Vertical image resolution. Use 0 if not known."]
7313    pub resolution_v: u16,
7314    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7315    pub cam_definition_version: u16,
7316    #[doc = "Name of the camera vendor"]
7317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7318    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7319    pub vendor_name: [u8; 32],
7320    #[doc = "Name of the camera model"]
7321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7322    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7323    pub model_name: [u8; 32],
7324    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7325    pub lens_id: u8,
7326    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7327    #[cfg_attr(feature = "ts", ts(type = "string"))]
7328    pub cam_definition_uri: CharArray<140>,
7329    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7331    pub gimbal_device_id: u8,
7332    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7334    pub camera_device_id: u8,
7335}
7336impl CAMERA_INFORMATION_DATA {
7337    pub const ENCODED_LEN: usize = 237usize;
7338    pub const DEFAULT: Self = Self {
7339        time_boot_ms: 0_u32,
7340        firmware_version: 0_u32,
7341        focal_length: 0.0_f32,
7342        sensor_size_h: 0.0_f32,
7343        sensor_size_v: 0.0_f32,
7344        flags: CameraCapFlags::DEFAULT,
7345        resolution_h: 0_u16,
7346        resolution_v: 0_u16,
7347        cam_definition_version: 0_u16,
7348        vendor_name: [0_u8; 32usize],
7349        model_name: [0_u8; 32usize],
7350        lens_id: 0_u8,
7351        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7352        gimbal_device_id: 0_u8,
7353        camera_device_id: 0_u8,
7354    };
7355    #[cfg(feature = "arbitrary")]
7356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7357        use arbitrary::{Arbitrary, Unstructured};
7358        let mut buf = [0u8; 1024];
7359        rng.fill_bytes(&mut buf);
7360        let mut unstructured = Unstructured::new(&buf);
7361        Self::arbitrary(&mut unstructured).unwrap_or_default()
7362    }
7363}
7364impl Default for CAMERA_INFORMATION_DATA {
7365    fn default() -> Self {
7366        Self::DEFAULT.clone()
7367    }
7368}
7369impl MessageData for CAMERA_INFORMATION_DATA {
7370    type Message = MavMessage;
7371    const ID: u32 = 259u32;
7372    const NAME: &'static str = "CAMERA_INFORMATION";
7373    const EXTRA_CRC: u8 = 92u8;
7374    const ENCODED_LEN: usize = 237usize;
7375    fn deser(
7376        _version: MavlinkVersion,
7377        __input: &[u8],
7378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7379        let avail_len = __input.len();
7380        let mut payload_buf = [0; Self::ENCODED_LEN];
7381        let mut buf = if avail_len < Self::ENCODED_LEN {
7382            payload_buf[0..avail_len].copy_from_slice(__input);
7383            Bytes::new(&payload_buf)
7384        } else {
7385            Bytes::new(__input)
7386        };
7387        let mut __struct = Self::default();
7388        __struct.time_boot_ms = buf.get_u32_le();
7389        __struct.firmware_version = buf.get_u32_le();
7390        __struct.focal_length = buf.get_f32_le();
7391        __struct.sensor_size_h = buf.get_f32_le();
7392        __struct.sensor_size_v = buf.get_f32_le();
7393        let tmp = buf.get_u32_le();
7394        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7395            ::mavlink_core::error::ParserError::InvalidFlag {
7396                flag_type: "CameraCapFlags",
7397                value: tmp as u32,
7398            },
7399        )?;
7400        __struct.resolution_h = buf.get_u16_le();
7401        __struct.resolution_v = buf.get_u16_le();
7402        __struct.cam_definition_version = buf.get_u16_le();
7403        for v in &mut __struct.vendor_name {
7404            let val = buf.get_u8();
7405            *v = val;
7406        }
7407        for v in &mut __struct.model_name {
7408            let val = buf.get_u8();
7409            *v = val;
7410        }
7411        __struct.lens_id = buf.get_u8();
7412        let mut tmp = [0_u8; 140usize];
7413        for v in &mut tmp {
7414            *v = buf.get_u8();
7415        }
7416        __struct.cam_definition_uri = CharArray::new(tmp);
7417        __struct.gimbal_device_id = buf.get_u8();
7418        __struct.camera_device_id = buf.get_u8();
7419        Ok(__struct)
7420    }
7421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7422        let mut __tmp = BytesMut::new(bytes);
7423        #[allow(clippy::absurd_extreme_comparisons)]
7424        #[allow(unused_comparisons)]
7425        if __tmp.remaining() < Self::ENCODED_LEN {
7426            panic!(
7427                "buffer is too small (need {} bytes, but got {})",
7428                Self::ENCODED_LEN,
7429                __tmp.remaining(),
7430            )
7431        }
7432        __tmp.put_u32_le(self.time_boot_ms);
7433        __tmp.put_u32_le(self.firmware_version);
7434        __tmp.put_f32_le(self.focal_length);
7435        __tmp.put_f32_le(self.sensor_size_h);
7436        __tmp.put_f32_le(self.sensor_size_v);
7437        __tmp.put_u32_le(self.flags.bits());
7438        __tmp.put_u16_le(self.resolution_h);
7439        __tmp.put_u16_le(self.resolution_v);
7440        __tmp.put_u16_le(self.cam_definition_version);
7441        for val in &self.vendor_name {
7442            __tmp.put_u8(*val);
7443        }
7444        for val in &self.model_name {
7445            __tmp.put_u8(*val);
7446        }
7447        __tmp.put_u8(self.lens_id);
7448        for val in &self.cam_definition_uri {
7449            __tmp.put_u8(*val);
7450        }
7451        if matches!(version, MavlinkVersion::V2) {
7452            __tmp.put_u8(self.gimbal_device_id);
7453            __tmp.put_u8(self.camera_device_id);
7454            let len = __tmp.len();
7455            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7456        } else {
7457            __tmp.len()
7458        }
7459    }
7460}
7461#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7462#[doc = ""]
7463#[doc = "ID: 260"]
7464#[derive(Debug, Clone, PartialEq)]
7465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7467#[cfg_attr(feature = "ts", derive(TS))]
7468#[cfg_attr(feature = "ts", ts(export))]
7469pub struct CAMERA_SETTINGS_DATA {
7470    #[doc = "Timestamp (time since system boot)."]
7471    pub time_boot_ms: u32,
7472    #[doc = "Camera mode"]
7473    pub mode_id: CameraMode,
7474    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7476    pub zoomLevel: f32,
7477    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7479    pub focusLevel: f32,
7480    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7482    pub camera_device_id: u8,
7483}
7484impl CAMERA_SETTINGS_DATA {
7485    pub const ENCODED_LEN: usize = 14usize;
7486    pub const DEFAULT: Self = Self {
7487        time_boot_ms: 0_u32,
7488        mode_id: CameraMode::DEFAULT,
7489        zoomLevel: 0.0_f32,
7490        focusLevel: 0.0_f32,
7491        camera_device_id: 0_u8,
7492    };
7493    #[cfg(feature = "arbitrary")]
7494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7495        use arbitrary::{Arbitrary, Unstructured};
7496        let mut buf = [0u8; 1024];
7497        rng.fill_bytes(&mut buf);
7498        let mut unstructured = Unstructured::new(&buf);
7499        Self::arbitrary(&mut unstructured).unwrap_or_default()
7500    }
7501}
7502impl Default for CAMERA_SETTINGS_DATA {
7503    fn default() -> Self {
7504        Self::DEFAULT.clone()
7505    }
7506}
7507impl MessageData for CAMERA_SETTINGS_DATA {
7508    type Message = MavMessage;
7509    const ID: u32 = 260u32;
7510    const NAME: &'static str = "CAMERA_SETTINGS";
7511    const EXTRA_CRC: u8 = 146u8;
7512    const ENCODED_LEN: usize = 14usize;
7513    fn deser(
7514        _version: MavlinkVersion,
7515        __input: &[u8],
7516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7517        let avail_len = __input.len();
7518        let mut payload_buf = [0; Self::ENCODED_LEN];
7519        let mut buf = if avail_len < Self::ENCODED_LEN {
7520            payload_buf[0..avail_len].copy_from_slice(__input);
7521            Bytes::new(&payload_buf)
7522        } else {
7523            Bytes::new(__input)
7524        };
7525        let mut __struct = Self::default();
7526        __struct.time_boot_ms = buf.get_u32_le();
7527        let tmp = buf.get_u8();
7528        __struct.mode_id =
7529            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7530                enum_type: "CameraMode",
7531                value: tmp as u32,
7532            })?;
7533        __struct.zoomLevel = buf.get_f32_le();
7534        __struct.focusLevel = buf.get_f32_le();
7535        __struct.camera_device_id = buf.get_u8();
7536        Ok(__struct)
7537    }
7538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7539        let mut __tmp = BytesMut::new(bytes);
7540        #[allow(clippy::absurd_extreme_comparisons)]
7541        #[allow(unused_comparisons)]
7542        if __tmp.remaining() < Self::ENCODED_LEN {
7543            panic!(
7544                "buffer is too small (need {} bytes, but got {})",
7545                Self::ENCODED_LEN,
7546                __tmp.remaining(),
7547            )
7548        }
7549        __tmp.put_u32_le(self.time_boot_ms);
7550        __tmp.put_u8(self.mode_id as u8);
7551        if matches!(version, MavlinkVersion::V2) {
7552            __tmp.put_f32_le(self.zoomLevel);
7553            __tmp.put_f32_le(self.focusLevel);
7554            __tmp.put_u8(self.camera_device_id);
7555            let len = __tmp.len();
7556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7557        } else {
7558            __tmp.len()
7559        }
7560    }
7561}
7562#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7563#[doc = ""]
7564#[doc = "ID: 277"]
7565#[derive(Debug, Clone, PartialEq)]
7566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7568#[cfg_attr(feature = "ts", derive(TS))]
7569#[cfg_attr(feature = "ts", ts(export))]
7570pub struct CAMERA_THERMAL_RANGE_DATA {
7571    #[doc = "Timestamp (time since system boot)."]
7572    pub time_boot_ms: u32,
7573    #[doc = "Temperature max."]
7574    pub max: f32,
7575    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7576    pub max_point_x: f32,
7577    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7578    pub max_point_y: f32,
7579    #[doc = "Temperature min."]
7580    pub min: f32,
7581    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7582    pub min_point_x: f32,
7583    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7584    pub min_point_y: f32,
7585    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7586    pub stream_id: u8,
7587    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7588    pub camera_device_id: u8,
7589}
7590impl CAMERA_THERMAL_RANGE_DATA {
7591    pub const ENCODED_LEN: usize = 30usize;
7592    pub const DEFAULT: Self = Self {
7593        time_boot_ms: 0_u32,
7594        max: 0.0_f32,
7595        max_point_x: 0.0_f32,
7596        max_point_y: 0.0_f32,
7597        min: 0.0_f32,
7598        min_point_x: 0.0_f32,
7599        min_point_y: 0.0_f32,
7600        stream_id: 0_u8,
7601        camera_device_id: 0_u8,
7602    };
7603    #[cfg(feature = "arbitrary")]
7604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7605        use arbitrary::{Arbitrary, Unstructured};
7606        let mut buf = [0u8; 1024];
7607        rng.fill_bytes(&mut buf);
7608        let mut unstructured = Unstructured::new(&buf);
7609        Self::arbitrary(&mut unstructured).unwrap_or_default()
7610    }
7611}
7612impl Default for CAMERA_THERMAL_RANGE_DATA {
7613    fn default() -> Self {
7614        Self::DEFAULT.clone()
7615    }
7616}
7617impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7618    type Message = MavMessage;
7619    const ID: u32 = 277u32;
7620    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7621    const EXTRA_CRC: u8 = 62u8;
7622    const ENCODED_LEN: usize = 30usize;
7623    fn deser(
7624        _version: MavlinkVersion,
7625        __input: &[u8],
7626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7627        let avail_len = __input.len();
7628        let mut payload_buf = [0; Self::ENCODED_LEN];
7629        let mut buf = if avail_len < Self::ENCODED_LEN {
7630            payload_buf[0..avail_len].copy_from_slice(__input);
7631            Bytes::new(&payload_buf)
7632        } else {
7633            Bytes::new(__input)
7634        };
7635        let mut __struct = Self::default();
7636        __struct.time_boot_ms = buf.get_u32_le();
7637        __struct.max = buf.get_f32_le();
7638        __struct.max_point_x = buf.get_f32_le();
7639        __struct.max_point_y = buf.get_f32_le();
7640        __struct.min = buf.get_f32_le();
7641        __struct.min_point_x = buf.get_f32_le();
7642        __struct.min_point_y = buf.get_f32_le();
7643        __struct.stream_id = buf.get_u8();
7644        __struct.camera_device_id = buf.get_u8();
7645        Ok(__struct)
7646    }
7647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7648        let mut __tmp = BytesMut::new(bytes);
7649        #[allow(clippy::absurd_extreme_comparisons)]
7650        #[allow(unused_comparisons)]
7651        if __tmp.remaining() < Self::ENCODED_LEN {
7652            panic!(
7653                "buffer is too small (need {} bytes, but got {})",
7654                Self::ENCODED_LEN,
7655                __tmp.remaining(),
7656            )
7657        }
7658        __tmp.put_u32_le(self.time_boot_ms);
7659        __tmp.put_f32_le(self.max);
7660        __tmp.put_f32_le(self.max_point_x);
7661        __tmp.put_f32_le(self.max_point_y);
7662        __tmp.put_f32_le(self.min);
7663        __tmp.put_f32_le(self.min_point_x);
7664        __tmp.put_f32_le(self.min_point_y);
7665        __tmp.put_u8(self.stream_id);
7666        __tmp.put_u8(self.camera_device_id);
7667        if matches!(version, MavlinkVersion::V2) {
7668            let len = __tmp.len();
7669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7670        } else {
7671            __tmp.len()
7672        }
7673    }
7674}
7675#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7676#[doc = ""]
7677#[doc = "ID: 276"]
7678#[derive(Debug, Clone, PartialEq)]
7679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7681#[cfg_attr(feature = "ts", derive(TS))]
7682#[cfg_attr(feature = "ts", ts(export))]
7683pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7684    #[doc = "Latitude of tracked object"]
7685    pub lat: i32,
7686    #[doc = "Longitude of tracked object"]
7687    pub lon: i32,
7688    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7689    pub alt: f32,
7690    #[doc = "Horizontal accuracy. NAN if unknown"]
7691    pub h_acc: f32,
7692    #[doc = "Vertical accuracy. NAN if unknown"]
7693    pub v_acc: f32,
7694    #[doc = "North velocity of tracked object. NAN if unknown"]
7695    pub vel_n: f32,
7696    #[doc = "East velocity of tracked object. NAN if unknown"]
7697    pub vel_e: f32,
7698    #[doc = "Down velocity of tracked object. NAN if unknown"]
7699    pub vel_d: f32,
7700    #[doc = "Velocity accuracy. NAN if unknown"]
7701    pub vel_acc: f32,
7702    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7703    pub dist: f32,
7704    #[doc = "Heading in radians, in NED. NAN if unknown"]
7705    pub hdg: f32,
7706    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7707    pub hdg_acc: f32,
7708    #[doc = "Current tracking status"]
7709    pub tracking_status: CameraTrackingStatusFlags,
7710    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7712    pub camera_device_id: u8,
7713}
7714impl CAMERA_TRACKING_GEO_STATUS_DATA {
7715    pub const ENCODED_LEN: usize = 50usize;
7716    pub const DEFAULT: Self = Self {
7717        lat: 0_i32,
7718        lon: 0_i32,
7719        alt: 0.0_f32,
7720        h_acc: 0.0_f32,
7721        v_acc: 0.0_f32,
7722        vel_n: 0.0_f32,
7723        vel_e: 0.0_f32,
7724        vel_d: 0.0_f32,
7725        vel_acc: 0.0_f32,
7726        dist: 0.0_f32,
7727        hdg: 0.0_f32,
7728        hdg_acc: 0.0_f32,
7729        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7730        camera_device_id: 0_u8,
7731    };
7732    #[cfg(feature = "arbitrary")]
7733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7734        use arbitrary::{Arbitrary, Unstructured};
7735        let mut buf = [0u8; 1024];
7736        rng.fill_bytes(&mut buf);
7737        let mut unstructured = Unstructured::new(&buf);
7738        Self::arbitrary(&mut unstructured).unwrap_or_default()
7739    }
7740}
7741impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7742    fn default() -> Self {
7743        Self::DEFAULT.clone()
7744    }
7745}
7746impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7747    type Message = MavMessage;
7748    const ID: u32 = 276u32;
7749    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7750    const EXTRA_CRC: u8 = 18u8;
7751    const ENCODED_LEN: usize = 50usize;
7752    fn deser(
7753        _version: MavlinkVersion,
7754        __input: &[u8],
7755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7756        let avail_len = __input.len();
7757        let mut payload_buf = [0; Self::ENCODED_LEN];
7758        let mut buf = if avail_len < Self::ENCODED_LEN {
7759            payload_buf[0..avail_len].copy_from_slice(__input);
7760            Bytes::new(&payload_buf)
7761        } else {
7762            Bytes::new(__input)
7763        };
7764        let mut __struct = Self::default();
7765        __struct.lat = buf.get_i32_le();
7766        __struct.lon = buf.get_i32_le();
7767        __struct.alt = buf.get_f32_le();
7768        __struct.h_acc = buf.get_f32_le();
7769        __struct.v_acc = buf.get_f32_le();
7770        __struct.vel_n = buf.get_f32_le();
7771        __struct.vel_e = buf.get_f32_le();
7772        __struct.vel_d = buf.get_f32_le();
7773        __struct.vel_acc = buf.get_f32_le();
7774        __struct.dist = buf.get_f32_le();
7775        __struct.hdg = buf.get_f32_le();
7776        __struct.hdg_acc = buf.get_f32_le();
7777        let tmp = buf.get_u8();
7778        __struct.tracking_status =
7779            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7780                enum_type: "CameraTrackingStatusFlags",
7781                value: tmp as u32,
7782            })?;
7783        __struct.camera_device_id = buf.get_u8();
7784        Ok(__struct)
7785    }
7786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7787        let mut __tmp = BytesMut::new(bytes);
7788        #[allow(clippy::absurd_extreme_comparisons)]
7789        #[allow(unused_comparisons)]
7790        if __tmp.remaining() < Self::ENCODED_LEN {
7791            panic!(
7792                "buffer is too small (need {} bytes, but got {})",
7793                Self::ENCODED_LEN,
7794                __tmp.remaining(),
7795            )
7796        }
7797        __tmp.put_i32_le(self.lat);
7798        __tmp.put_i32_le(self.lon);
7799        __tmp.put_f32_le(self.alt);
7800        __tmp.put_f32_le(self.h_acc);
7801        __tmp.put_f32_le(self.v_acc);
7802        __tmp.put_f32_le(self.vel_n);
7803        __tmp.put_f32_le(self.vel_e);
7804        __tmp.put_f32_le(self.vel_d);
7805        __tmp.put_f32_le(self.vel_acc);
7806        __tmp.put_f32_le(self.dist);
7807        __tmp.put_f32_le(self.hdg);
7808        __tmp.put_f32_le(self.hdg_acc);
7809        __tmp.put_u8(self.tracking_status as u8);
7810        if matches!(version, MavlinkVersion::V2) {
7811            __tmp.put_u8(self.camera_device_id);
7812            let len = __tmp.len();
7813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7814        } else {
7815            __tmp.len()
7816        }
7817    }
7818}
7819#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7820#[doc = ""]
7821#[doc = "ID: 275"]
7822#[derive(Debug, Clone, PartialEq)]
7823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7825#[cfg_attr(feature = "ts", derive(TS))]
7826#[cfg_attr(feature = "ts", ts(export))]
7827pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7828    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7829    pub point_x: f32,
7830    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7831    pub point_y: f32,
7832    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7833    pub radius: f32,
7834    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7835    pub rec_top_x: f32,
7836    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7837    pub rec_top_y: f32,
7838    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7839    pub rec_bottom_x: f32,
7840    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7841    pub rec_bottom_y: f32,
7842    #[doc = "Current tracking status"]
7843    pub tracking_status: CameraTrackingStatusFlags,
7844    #[doc = "Current tracking mode"]
7845    pub tracking_mode: CameraTrackingMode,
7846    #[doc = "Defines location of target data"]
7847    pub target_data: CameraTrackingTargetData,
7848    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7849    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7850    pub camera_device_id: u8,
7851}
7852impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7853    pub const ENCODED_LEN: usize = 32usize;
7854    pub const DEFAULT: Self = Self {
7855        point_x: 0.0_f32,
7856        point_y: 0.0_f32,
7857        radius: 0.0_f32,
7858        rec_top_x: 0.0_f32,
7859        rec_top_y: 0.0_f32,
7860        rec_bottom_x: 0.0_f32,
7861        rec_bottom_y: 0.0_f32,
7862        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7863        tracking_mode: CameraTrackingMode::DEFAULT,
7864        target_data: CameraTrackingTargetData::DEFAULT,
7865        camera_device_id: 0_u8,
7866    };
7867    #[cfg(feature = "arbitrary")]
7868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7869        use arbitrary::{Arbitrary, Unstructured};
7870        let mut buf = [0u8; 1024];
7871        rng.fill_bytes(&mut buf);
7872        let mut unstructured = Unstructured::new(&buf);
7873        Self::arbitrary(&mut unstructured).unwrap_or_default()
7874    }
7875}
7876impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7877    fn default() -> Self {
7878        Self::DEFAULT.clone()
7879    }
7880}
7881impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7882    type Message = MavMessage;
7883    const ID: u32 = 275u32;
7884    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7885    const EXTRA_CRC: u8 = 126u8;
7886    const ENCODED_LEN: usize = 32usize;
7887    fn deser(
7888        _version: MavlinkVersion,
7889        __input: &[u8],
7890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7891        let avail_len = __input.len();
7892        let mut payload_buf = [0; Self::ENCODED_LEN];
7893        let mut buf = if avail_len < Self::ENCODED_LEN {
7894            payload_buf[0..avail_len].copy_from_slice(__input);
7895            Bytes::new(&payload_buf)
7896        } else {
7897            Bytes::new(__input)
7898        };
7899        let mut __struct = Self::default();
7900        __struct.point_x = buf.get_f32_le();
7901        __struct.point_y = buf.get_f32_le();
7902        __struct.radius = buf.get_f32_le();
7903        __struct.rec_top_x = buf.get_f32_le();
7904        __struct.rec_top_y = buf.get_f32_le();
7905        __struct.rec_bottom_x = buf.get_f32_le();
7906        __struct.rec_bottom_y = buf.get_f32_le();
7907        let tmp = buf.get_u8();
7908        __struct.tracking_status =
7909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7910                enum_type: "CameraTrackingStatusFlags",
7911                value: tmp as u32,
7912            })?;
7913        let tmp = buf.get_u8();
7914        __struct.tracking_mode =
7915            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7916                enum_type: "CameraTrackingMode",
7917                value: tmp as u32,
7918            })?;
7919        let tmp = buf.get_u8();
7920        __struct.target_data =
7921            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7922                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7923                    flag_type: "CameraTrackingTargetData",
7924                    value: tmp as u32,
7925                })?;
7926        __struct.camera_device_id = buf.get_u8();
7927        Ok(__struct)
7928    }
7929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7930        let mut __tmp = BytesMut::new(bytes);
7931        #[allow(clippy::absurd_extreme_comparisons)]
7932        #[allow(unused_comparisons)]
7933        if __tmp.remaining() < Self::ENCODED_LEN {
7934            panic!(
7935                "buffer is too small (need {} bytes, but got {})",
7936                Self::ENCODED_LEN,
7937                __tmp.remaining(),
7938            )
7939        }
7940        __tmp.put_f32_le(self.point_x);
7941        __tmp.put_f32_le(self.point_y);
7942        __tmp.put_f32_le(self.radius);
7943        __tmp.put_f32_le(self.rec_top_x);
7944        __tmp.put_f32_le(self.rec_top_y);
7945        __tmp.put_f32_le(self.rec_bottom_x);
7946        __tmp.put_f32_le(self.rec_bottom_y);
7947        __tmp.put_u8(self.tracking_status as u8);
7948        __tmp.put_u8(self.tracking_mode as u8);
7949        __tmp.put_u8(self.target_data.bits());
7950        if matches!(version, MavlinkVersion::V2) {
7951            __tmp.put_u8(self.camera_device_id);
7952            let len = __tmp.len();
7953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7954        } else {
7955            __tmp.len()
7956        }
7957    }
7958}
7959#[doc = "Camera-IMU triggering and synchronisation message."]
7960#[doc = ""]
7961#[doc = "ID: 112"]
7962#[derive(Debug, Clone, PartialEq)]
7963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7965#[cfg_attr(feature = "ts", derive(TS))]
7966#[cfg_attr(feature = "ts", ts(export))]
7967pub struct CAMERA_TRIGGER_DATA {
7968    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7969    pub time_usec: u64,
7970    #[doc = "Image frame sequence"]
7971    pub seq: u32,
7972}
7973impl CAMERA_TRIGGER_DATA {
7974    pub const ENCODED_LEN: usize = 12usize;
7975    pub const DEFAULT: Self = Self {
7976        time_usec: 0_u64,
7977        seq: 0_u32,
7978    };
7979    #[cfg(feature = "arbitrary")]
7980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7981        use arbitrary::{Arbitrary, Unstructured};
7982        let mut buf = [0u8; 1024];
7983        rng.fill_bytes(&mut buf);
7984        let mut unstructured = Unstructured::new(&buf);
7985        Self::arbitrary(&mut unstructured).unwrap_or_default()
7986    }
7987}
7988impl Default for CAMERA_TRIGGER_DATA {
7989    fn default() -> Self {
7990        Self::DEFAULT.clone()
7991    }
7992}
7993impl MessageData for CAMERA_TRIGGER_DATA {
7994    type Message = MavMessage;
7995    const ID: u32 = 112u32;
7996    const NAME: &'static str = "CAMERA_TRIGGER";
7997    const EXTRA_CRC: u8 = 174u8;
7998    const ENCODED_LEN: usize = 12usize;
7999    fn deser(
8000        _version: MavlinkVersion,
8001        __input: &[u8],
8002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8003        let avail_len = __input.len();
8004        let mut payload_buf = [0; Self::ENCODED_LEN];
8005        let mut buf = if avail_len < Self::ENCODED_LEN {
8006            payload_buf[0..avail_len].copy_from_slice(__input);
8007            Bytes::new(&payload_buf)
8008        } else {
8009            Bytes::new(__input)
8010        };
8011        let mut __struct = Self::default();
8012        __struct.time_usec = buf.get_u64_le();
8013        __struct.seq = buf.get_u32_le();
8014        Ok(__struct)
8015    }
8016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8017        let mut __tmp = BytesMut::new(bytes);
8018        #[allow(clippy::absurd_extreme_comparisons)]
8019        #[allow(unused_comparisons)]
8020        if __tmp.remaining() < Self::ENCODED_LEN {
8021            panic!(
8022                "buffer is too small (need {} bytes, but got {})",
8023                Self::ENCODED_LEN,
8024                __tmp.remaining(),
8025            )
8026        }
8027        __tmp.put_u64_le(self.time_usec);
8028        __tmp.put_u32_le(self.seq);
8029        if matches!(version, MavlinkVersion::V2) {
8030            let len = __tmp.len();
8031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8032        } else {
8033            __tmp.len()
8034        }
8035    }
8036}
8037#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8038#[doc = ""]
8039#[doc = "ID: 387"]
8040#[derive(Debug, Clone, PartialEq)]
8041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8043#[cfg_attr(feature = "ts", derive(TS))]
8044#[cfg_attr(feature = "ts", ts(export))]
8045pub struct CANFD_FRAME_DATA {
8046    #[doc = "Frame ID"]
8047    pub id: u32,
8048    #[doc = "System ID."]
8049    pub target_system: u8,
8050    #[doc = "Component ID."]
8051    pub target_component: u8,
8052    #[doc = "bus number"]
8053    pub bus: u8,
8054    #[doc = "Frame length"]
8055    pub len: u8,
8056    #[doc = "Frame data"]
8057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8059    pub data: [u8; 64],
8060}
8061impl CANFD_FRAME_DATA {
8062    pub const ENCODED_LEN: usize = 72usize;
8063    pub const DEFAULT: Self = Self {
8064        id: 0_u32,
8065        target_system: 0_u8,
8066        target_component: 0_u8,
8067        bus: 0_u8,
8068        len: 0_u8,
8069        data: [0_u8; 64usize],
8070    };
8071    #[cfg(feature = "arbitrary")]
8072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8073        use arbitrary::{Arbitrary, Unstructured};
8074        let mut buf = [0u8; 1024];
8075        rng.fill_bytes(&mut buf);
8076        let mut unstructured = Unstructured::new(&buf);
8077        Self::arbitrary(&mut unstructured).unwrap_or_default()
8078    }
8079}
8080impl Default for CANFD_FRAME_DATA {
8081    fn default() -> Self {
8082        Self::DEFAULT.clone()
8083    }
8084}
8085impl MessageData for CANFD_FRAME_DATA {
8086    type Message = MavMessage;
8087    const ID: u32 = 387u32;
8088    const NAME: &'static str = "CANFD_FRAME";
8089    const EXTRA_CRC: u8 = 4u8;
8090    const ENCODED_LEN: usize = 72usize;
8091    fn deser(
8092        _version: MavlinkVersion,
8093        __input: &[u8],
8094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8095        let avail_len = __input.len();
8096        let mut payload_buf = [0; Self::ENCODED_LEN];
8097        let mut buf = if avail_len < Self::ENCODED_LEN {
8098            payload_buf[0..avail_len].copy_from_slice(__input);
8099            Bytes::new(&payload_buf)
8100        } else {
8101            Bytes::new(__input)
8102        };
8103        let mut __struct = Self::default();
8104        __struct.id = buf.get_u32_le();
8105        __struct.target_system = buf.get_u8();
8106        __struct.target_component = buf.get_u8();
8107        __struct.bus = buf.get_u8();
8108        __struct.len = buf.get_u8();
8109        for v in &mut __struct.data {
8110            let val = buf.get_u8();
8111            *v = val;
8112        }
8113        Ok(__struct)
8114    }
8115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8116        let mut __tmp = BytesMut::new(bytes);
8117        #[allow(clippy::absurd_extreme_comparisons)]
8118        #[allow(unused_comparisons)]
8119        if __tmp.remaining() < Self::ENCODED_LEN {
8120            panic!(
8121                "buffer is too small (need {} bytes, but got {})",
8122                Self::ENCODED_LEN,
8123                __tmp.remaining(),
8124            )
8125        }
8126        __tmp.put_u32_le(self.id);
8127        __tmp.put_u8(self.target_system);
8128        __tmp.put_u8(self.target_component);
8129        __tmp.put_u8(self.bus);
8130        __tmp.put_u8(self.len);
8131        for val in &self.data {
8132            __tmp.put_u8(*val);
8133        }
8134        if matches!(version, MavlinkVersion::V2) {
8135            let len = __tmp.len();
8136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8137        } else {
8138            __tmp.len()
8139        }
8140    }
8141}
8142#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8143#[doc = ""]
8144#[doc = "ID: 388"]
8145#[derive(Debug, Clone, PartialEq)]
8146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8148#[cfg_attr(feature = "ts", derive(TS))]
8149#[cfg_attr(feature = "ts", ts(export))]
8150pub struct CAN_FILTER_MODIFY_DATA {
8151    #[doc = "filter IDs, length num_ids"]
8152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8153    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8154    pub ids: [u16; 16],
8155    #[doc = "System ID."]
8156    pub target_system: u8,
8157    #[doc = "Component ID."]
8158    pub target_component: u8,
8159    #[doc = "bus number"]
8160    pub bus: u8,
8161    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8162    pub operation: CanFilterOp,
8163    #[doc = "number of IDs in filter list"]
8164    pub num_ids: u8,
8165}
8166impl CAN_FILTER_MODIFY_DATA {
8167    pub const ENCODED_LEN: usize = 37usize;
8168    pub const DEFAULT: Self = Self {
8169        ids: [0_u16; 16usize],
8170        target_system: 0_u8,
8171        target_component: 0_u8,
8172        bus: 0_u8,
8173        operation: CanFilterOp::DEFAULT,
8174        num_ids: 0_u8,
8175    };
8176    #[cfg(feature = "arbitrary")]
8177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8178        use arbitrary::{Arbitrary, Unstructured};
8179        let mut buf = [0u8; 1024];
8180        rng.fill_bytes(&mut buf);
8181        let mut unstructured = Unstructured::new(&buf);
8182        Self::arbitrary(&mut unstructured).unwrap_or_default()
8183    }
8184}
8185impl Default for CAN_FILTER_MODIFY_DATA {
8186    fn default() -> Self {
8187        Self::DEFAULT.clone()
8188    }
8189}
8190impl MessageData for CAN_FILTER_MODIFY_DATA {
8191    type Message = MavMessage;
8192    const ID: u32 = 388u32;
8193    const NAME: &'static str = "CAN_FILTER_MODIFY";
8194    const EXTRA_CRC: u8 = 8u8;
8195    const ENCODED_LEN: usize = 37usize;
8196    fn deser(
8197        _version: MavlinkVersion,
8198        __input: &[u8],
8199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8200        let avail_len = __input.len();
8201        let mut payload_buf = [0; Self::ENCODED_LEN];
8202        let mut buf = if avail_len < Self::ENCODED_LEN {
8203            payload_buf[0..avail_len].copy_from_slice(__input);
8204            Bytes::new(&payload_buf)
8205        } else {
8206            Bytes::new(__input)
8207        };
8208        let mut __struct = Self::default();
8209        for v in &mut __struct.ids {
8210            let val = buf.get_u16_le();
8211            *v = val;
8212        }
8213        __struct.target_system = buf.get_u8();
8214        __struct.target_component = buf.get_u8();
8215        __struct.bus = buf.get_u8();
8216        let tmp = buf.get_u8();
8217        __struct.operation =
8218            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8219                enum_type: "CanFilterOp",
8220                value: tmp as u32,
8221            })?;
8222        __struct.num_ids = buf.get_u8();
8223        Ok(__struct)
8224    }
8225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8226        let mut __tmp = BytesMut::new(bytes);
8227        #[allow(clippy::absurd_extreme_comparisons)]
8228        #[allow(unused_comparisons)]
8229        if __tmp.remaining() < Self::ENCODED_LEN {
8230            panic!(
8231                "buffer is too small (need {} bytes, but got {})",
8232                Self::ENCODED_LEN,
8233                __tmp.remaining(),
8234            )
8235        }
8236        for val in &self.ids {
8237            __tmp.put_u16_le(*val);
8238        }
8239        __tmp.put_u8(self.target_system);
8240        __tmp.put_u8(self.target_component);
8241        __tmp.put_u8(self.bus);
8242        __tmp.put_u8(self.operation as u8);
8243        __tmp.put_u8(self.num_ids);
8244        if matches!(version, MavlinkVersion::V2) {
8245            let len = __tmp.len();
8246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8247        } else {
8248            __tmp.len()
8249        }
8250    }
8251}
8252#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8253#[doc = ""]
8254#[doc = "ID: 386"]
8255#[derive(Debug, Clone, PartialEq)]
8256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8258#[cfg_attr(feature = "ts", derive(TS))]
8259#[cfg_attr(feature = "ts", ts(export))]
8260pub struct CAN_FRAME_DATA {
8261    #[doc = "Frame ID"]
8262    pub id: u32,
8263    #[doc = "System ID."]
8264    pub target_system: u8,
8265    #[doc = "Component ID."]
8266    pub target_component: u8,
8267    #[doc = "Bus number"]
8268    pub bus: u8,
8269    #[doc = "Frame length"]
8270    pub len: u8,
8271    #[doc = "Frame data"]
8272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8273    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8274    pub data: [u8; 8],
8275}
8276impl CAN_FRAME_DATA {
8277    pub const ENCODED_LEN: usize = 16usize;
8278    pub const DEFAULT: Self = Self {
8279        id: 0_u32,
8280        target_system: 0_u8,
8281        target_component: 0_u8,
8282        bus: 0_u8,
8283        len: 0_u8,
8284        data: [0_u8; 8usize],
8285    };
8286    #[cfg(feature = "arbitrary")]
8287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8288        use arbitrary::{Arbitrary, Unstructured};
8289        let mut buf = [0u8; 1024];
8290        rng.fill_bytes(&mut buf);
8291        let mut unstructured = Unstructured::new(&buf);
8292        Self::arbitrary(&mut unstructured).unwrap_or_default()
8293    }
8294}
8295impl Default for CAN_FRAME_DATA {
8296    fn default() -> Self {
8297        Self::DEFAULT.clone()
8298    }
8299}
8300impl MessageData for CAN_FRAME_DATA {
8301    type Message = MavMessage;
8302    const ID: u32 = 386u32;
8303    const NAME: &'static str = "CAN_FRAME";
8304    const EXTRA_CRC: u8 = 132u8;
8305    const ENCODED_LEN: usize = 16usize;
8306    fn deser(
8307        _version: MavlinkVersion,
8308        __input: &[u8],
8309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8310        let avail_len = __input.len();
8311        let mut payload_buf = [0; Self::ENCODED_LEN];
8312        let mut buf = if avail_len < Self::ENCODED_LEN {
8313            payload_buf[0..avail_len].copy_from_slice(__input);
8314            Bytes::new(&payload_buf)
8315        } else {
8316            Bytes::new(__input)
8317        };
8318        let mut __struct = Self::default();
8319        __struct.id = buf.get_u32_le();
8320        __struct.target_system = buf.get_u8();
8321        __struct.target_component = buf.get_u8();
8322        __struct.bus = buf.get_u8();
8323        __struct.len = buf.get_u8();
8324        for v in &mut __struct.data {
8325            let val = buf.get_u8();
8326            *v = val;
8327        }
8328        Ok(__struct)
8329    }
8330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8331        let mut __tmp = BytesMut::new(bytes);
8332        #[allow(clippy::absurd_extreme_comparisons)]
8333        #[allow(unused_comparisons)]
8334        if __tmp.remaining() < Self::ENCODED_LEN {
8335            panic!(
8336                "buffer is too small (need {} bytes, but got {})",
8337                Self::ENCODED_LEN,
8338                __tmp.remaining(),
8339            )
8340        }
8341        __tmp.put_u32_le(self.id);
8342        __tmp.put_u8(self.target_system);
8343        __tmp.put_u8(self.target_component);
8344        __tmp.put_u8(self.bus);
8345        __tmp.put_u8(self.len);
8346        for val in &self.data {
8347            __tmp.put_u8(*val);
8348        }
8349        if matches!(version, MavlinkVersion::V2) {
8350            let len = __tmp.len();
8351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8352        } else {
8353            __tmp.len()
8354        }
8355    }
8356}
8357#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8358#[doc = ""]
8359#[doc = "ID: 336"]
8360#[derive(Debug, Clone, PartialEq)]
8361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8363#[cfg_attr(feature = "ts", derive(TS))]
8364#[cfg_attr(feature = "ts", ts(export))]
8365pub struct CELLULAR_CONFIG_DATA {
8366    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8367    pub enable_lte: u8,
8368    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8369    pub enable_pin: u8,
8370    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8371    #[cfg_attr(feature = "ts", ts(type = "string"))]
8372    pub pin: CharArray<16>,
8373    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8374    #[cfg_attr(feature = "ts", ts(type = "string"))]
8375    pub new_pin: CharArray<16>,
8376    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8377    #[cfg_attr(feature = "ts", ts(type = "string"))]
8378    pub apn: CharArray<32>,
8379    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8380    #[cfg_attr(feature = "ts", ts(type = "string"))]
8381    pub puk: CharArray<16>,
8382    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8383    pub roaming: u8,
8384    #[doc = "Message acceptance response (sent back to GS)."]
8385    pub response: CellularConfigResponse,
8386}
8387impl CELLULAR_CONFIG_DATA {
8388    pub const ENCODED_LEN: usize = 84usize;
8389    pub const DEFAULT: Self = Self {
8390        enable_lte: 0_u8,
8391        enable_pin: 0_u8,
8392        pin: CharArray::new([0_u8; 16usize]),
8393        new_pin: CharArray::new([0_u8; 16usize]),
8394        apn: CharArray::new([0_u8; 32usize]),
8395        puk: CharArray::new([0_u8; 16usize]),
8396        roaming: 0_u8,
8397        response: CellularConfigResponse::DEFAULT,
8398    };
8399    #[cfg(feature = "arbitrary")]
8400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8401        use arbitrary::{Arbitrary, Unstructured};
8402        let mut buf = [0u8; 1024];
8403        rng.fill_bytes(&mut buf);
8404        let mut unstructured = Unstructured::new(&buf);
8405        Self::arbitrary(&mut unstructured).unwrap_or_default()
8406    }
8407}
8408impl Default for CELLULAR_CONFIG_DATA {
8409    fn default() -> Self {
8410        Self::DEFAULT.clone()
8411    }
8412}
8413impl MessageData for CELLULAR_CONFIG_DATA {
8414    type Message = MavMessage;
8415    const ID: u32 = 336u32;
8416    const NAME: &'static str = "CELLULAR_CONFIG";
8417    const EXTRA_CRC: u8 = 245u8;
8418    const ENCODED_LEN: usize = 84usize;
8419    fn deser(
8420        _version: MavlinkVersion,
8421        __input: &[u8],
8422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8423        let avail_len = __input.len();
8424        let mut payload_buf = [0; Self::ENCODED_LEN];
8425        let mut buf = if avail_len < Self::ENCODED_LEN {
8426            payload_buf[0..avail_len].copy_from_slice(__input);
8427            Bytes::new(&payload_buf)
8428        } else {
8429            Bytes::new(__input)
8430        };
8431        let mut __struct = Self::default();
8432        __struct.enable_lte = buf.get_u8();
8433        __struct.enable_pin = buf.get_u8();
8434        let mut tmp = [0_u8; 16usize];
8435        for v in &mut tmp {
8436            *v = buf.get_u8();
8437        }
8438        __struct.pin = CharArray::new(tmp);
8439        let mut tmp = [0_u8; 16usize];
8440        for v in &mut tmp {
8441            *v = buf.get_u8();
8442        }
8443        __struct.new_pin = CharArray::new(tmp);
8444        let mut tmp = [0_u8; 32usize];
8445        for v in &mut tmp {
8446            *v = buf.get_u8();
8447        }
8448        __struct.apn = CharArray::new(tmp);
8449        let mut tmp = [0_u8; 16usize];
8450        for v in &mut tmp {
8451            *v = buf.get_u8();
8452        }
8453        __struct.puk = CharArray::new(tmp);
8454        __struct.roaming = buf.get_u8();
8455        let tmp = buf.get_u8();
8456        __struct.response =
8457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8458                enum_type: "CellularConfigResponse",
8459                value: tmp as u32,
8460            })?;
8461        Ok(__struct)
8462    }
8463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8464        let mut __tmp = BytesMut::new(bytes);
8465        #[allow(clippy::absurd_extreme_comparisons)]
8466        #[allow(unused_comparisons)]
8467        if __tmp.remaining() < Self::ENCODED_LEN {
8468            panic!(
8469                "buffer is too small (need {} bytes, but got {})",
8470                Self::ENCODED_LEN,
8471                __tmp.remaining(),
8472            )
8473        }
8474        __tmp.put_u8(self.enable_lte);
8475        __tmp.put_u8(self.enable_pin);
8476        for val in &self.pin {
8477            __tmp.put_u8(*val);
8478        }
8479        for val in &self.new_pin {
8480            __tmp.put_u8(*val);
8481        }
8482        for val in &self.apn {
8483            __tmp.put_u8(*val);
8484        }
8485        for val in &self.puk {
8486            __tmp.put_u8(*val);
8487        }
8488        __tmp.put_u8(self.roaming);
8489        __tmp.put_u8(self.response as u8);
8490        if matches!(version, MavlinkVersion::V2) {
8491            let len = __tmp.len();
8492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8493        } else {
8494            __tmp.len()
8495        }
8496    }
8497}
8498#[doc = "Report current used cellular network status."]
8499#[doc = ""]
8500#[doc = "ID: 334"]
8501#[derive(Debug, Clone, PartialEq)]
8502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8504#[cfg_attr(feature = "ts", derive(TS))]
8505#[cfg_attr(feature = "ts", ts(export))]
8506pub struct CELLULAR_STATUS_DATA {
8507    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8508    pub mcc: u16,
8509    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8510    pub mnc: u16,
8511    #[doc = "Location area code. If unknown, set to 0"]
8512    pub lac: u16,
8513    #[doc = "Cellular modem status"]
8514    pub status: CellularStatusFlag,
8515    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8516    pub failure_reason: CellularNetworkFailedReason,
8517    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8518    pub mavtype: CellularNetworkRadioType,
8519    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8520    pub quality: u8,
8521}
8522impl CELLULAR_STATUS_DATA {
8523    pub const ENCODED_LEN: usize = 10usize;
8524    pub const DEFAULT: Self = Self {
8525        mcc: 0_u16,
8526        mnc: 0_u16,
8527        lac: 0_u16,
8528        status: CellularStatusFlag::DEFAULT,
8529        failure_reason: CellularNetworkFailedReason::DEFAULT,
8530        mavtype: CellularNetworkRadioType::DEFAULT,
8531        quality: 0_u8,
8532    };
8533    #[cfg(feature = "arbitrary")]
8534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8535        use arbitrary::{Arbitrary, Unstructured};
8536        let mut buf = [0u8; 1024];
8537        rng.fill_bytes(&mut buf);
8538        let mut unstructured = Unstructured::new(&buf);
8539        Self::arbitrary(&mut unstructured).unwrap_or_default()
8540    }
8541}
8542impl Default for CELLULAR_STATUS_DATA {
8543    fn default() -> Self {
8544        Self::DEFAULT.clone()
8545    }
8546}
8547impl MessageData for CELLULAR_STATUS_DATA {
8548    type Message = MavMessage;
8549    const ID: u32 = 334u32;
8550    const NAME: &'static str = "CELLULAR_STATUS";
8551    const EXTRA_CRC: u8 = 72u8;
8552    const ENCODED_LEN: usize = 10usize;
8553    fn deser(
8554        _version: MavlinkVersion,
8555        __input: &[u8],
8556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8557        let avail_len = __input.len();
8558        let mut payload_buf = [0; Self::ENCODED_LEN];
8559        let mut buf = if avail_len < Self::ENCODED_LEN {
8560            payload_buf[0..avail_len].copy_from_slice(__input);
8561            Bytes::new(&payload_buf)
8562        } else {
8563            Bytes::new(__input)
8564        };
8565        let mut __struct = Self::default();
8566        __struct.mcc = buf.get_u16_le();
8567        __struct.mnc = buf.get_u16_le();
8568        __struct.lac = buf.get_u16_le();
8569        let tmp = buf.get_u8();
8570        __struct.status =
8571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8572                enum_type: "CellularStatusFlag",
8573                value: tmp as u32,
8574            })?;
8575        let tmp = buf.get_u8();
8576        __struct.failure_reason =
8577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8578                enum_type: "CellularNetworkFailedReason",
8579                value: tmp as u32,
8580            })?;
8581        let tmp = buf.get_u8();
8582        __struct.mavtype =
8583            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8584                enum_type: "CellularNetworkRadioType",
8585                value: tmp as u32,
8586            })?;
8587        __struct.quality = buf.get_u8();
8588        Ok(__struct)
8589    }
8590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8591        let mut __tmp = BytesMut::new(bytes);
8592        #[allow(clippy::absurd_extreme_comparisons)]
8593        #[allow(unused_comparisons)]
8594        if __tmp.remaining() < Self::ENCODED_LEN {
8595            panic!(
8596                "buffer is too small (need {} bytes, but got {})",
8597                Self::ENCODED_LEN,
8598                __tmp.remaining(),
8599            )
8600        }
8601        __tmp.put_u16_le(self.mcc);
8602        __tmp.put_u16_le(self.mnc);
8603        __tmp.put_u16_le(self.lac);
8604        __tmp.put_u8(self.status as u8);
8605        __tmp.put_u8(self.failure_reason as u8);
8606        __tmp.put_u8(self.mavtype as u8);
8607        __tmp.put_u8(self.quality);
8608        if matches!(version, MavlinkVersion::V2) {
8609            let len = __tmp.len();
8610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8611        } else {
8612            __tmp.len()
8613        }
8614    }
8615}
8616#[doc = "Request to control this MAV."]
8617#[doc = ""]
8618#[doc = "ID: 5"]
8619#[derive(Debug, Clone, PartialEq)]
8620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8622#[cfg_attr(feature = "ts", derive(TS))]
8623#[cfg_attr(feature = "ts", ts(export))]
8624pub struct CHANGE_OPERATOR_CONTROL_DATA {
8625    #[doc = "System the GCS requests control for"]
8626    pub target_system: u8,
8627    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8628    pub control_request: u8,
8629    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8630    pub version: u8,
8631    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8632    #[cfg_attr(feature = "ts", ts(type = "string"))]
8633    pub passkey: CharArray<25>,
8634}
8635impl CHANGE_OPERATOR_CONTROL_DATA {
8636    pub const ENCODED_LEN: usize = 28usize;
8637    pub const DEFAULT: Self = Self {
8638        target_system: 0_u8,
8639        control_request: 0_u8,
8640        version: 0_u8,
8641        passkey: CharArray::new([0_u8; 25usize]),
8642    };
8643    #[cfg(feature = "arbitrary")]
8644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8645        use arbitrary::{Arbitrary, Unstructured};
8646        let mut buf = [0u8; 1024];
8647        rng.fill_bytes(&mut buf);
8648        let mut unstructured = Unstructured::new(&buf);
8649        Self::arbitrary(&mut unstructured).unwrap_or_default()
8650    }
8651}
8652impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8653    fn default() -> Self {
8654        Self::DEFAULT.clone()
8655    }
8656}
8657impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8658    type Message = MavMessage;
8659    const ID: u32 = 5u32;
8660    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8661    const EXTRA_CRC: u8 = 217u8;
8662    const ENCODED_LEN: usize = 28usize;
8663    fn deser(
8664        _version: MavlinkVersion,
8665        __input: &[u8],
8666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8667        let avail_len = __input.len();
8668        let mut payload_buf = [0; Self::ENCODED_LEN];
8669        let mut buf = if avail_len < Self::ENCODED_LEN {
8670            payload_buf[0..avail_len].copy_from_slice(__input);
8671            Bytes::new(&payload_buf)
8672        } else {
8673            Bytes::new(__input)
8674        };
8675        let mut __struct = Self::default();
8676        __struct.target_system = buf.get_u8();
8677        __struct.control_request = buf.get_u8();
8678        __struct.version = buf.get_u8();
8679        let mut tmp = [0_u8; 25usize];
8680        for v in &mut tmp {
8681            *v = buf.get_u8();
8682        }
8683        __struct.passkey = CharArray::new(tmp);
8684        Ok(__struct)
8685    }
8686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8687        let mut __tmp = BytesMut::new(bytes);
8688        #[allow(clippy::absurd_extreme_comparisons)]
8689        #[allow(unused_comparisons)]
8690        if __tmp.remaining() < Self::ENCODED_LEN {
8691            panic!(
8692                "buffer is too small (need {} bytes, but got {})",
8693                Self::ENCODED_LEN,
8694                __tmp.remaining(),
8695            )
8696        }
8697        __tmp.put_u8(self.target_system);
8698        __tmp.put_u8(self.control_request);
8699        __tmp.put_u8(self.version);
8700        for val in &self.passkey {
8701            __tmp.put_u8(*val);
8702        }
8703        if matches!(version, MavlinkVersion::V2) {
8704            let len = __tmp.len();
8705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8706        } else {
8707            __tmp.len()
8708        }
8709    }
8710}
8711#[doc = "Accept / deny control of this MAV."]
8712#[doc = ""]
8713#[doc = "ID: 6"]
8714#[derive(Debug, Clone, PartialEq)]
8715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8717#[cfg_attr(feature = "ts", derive(TS))]
8718#[cfg_attr(feature = "ts", ts(export))]
8719pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8720    #[doc = "ID of the GCS this message"]
8721    pub gcs_system_id: u8,
8722    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8723    pub control_request: u8,
8724    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8725    pub ack: u8,
8726}
8727impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8728    pub const ENCODED_LEN: usize = 3usize;
8729    pub const DEFAULT: Self = Self {
8730        gcs_system_id: 0_u8,
8731        control_request: 0_u8,
8732        ack: 0_u8,
8733    };
8734    #[cfg(feature = "arbitrary")]
8735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8736        use arbitrary::{Arbitrary, Unstructured};
8737        let mut buf = [0u8; 1024];
8738        rng.fill_bytes(&mut buf);
8739        let mut unstructured = Unstructured::new(&buf);
8740        Self::arbitrary(&mut unstructured).unwrap_or_default()
8741    }
8742}
8743impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8744    fn default() -> Self {
8745        Self::DEFAULT.clone()
8746    }
8747}
8748impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8749    type Message = MavMessage;
8750    const ID: u32 = 6u32;
8751    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8752    const EXTRA_CRC: u8 = 104u8;
8753    const ENCODED_LEN: usize = 3usize;
8754    fn deser(
8755        _version: MavlinkVersion,
8756        __input: &[u8],
8757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8758        let avail_len = __input.len();
8759        let mut payload_buf = [0; Self::ENCODED_LEN];
8760        let mut buf = if avail_len < Self::ENCODED_LEN {
8761            payload_buf[0..avail_len].copy_from_slice(__input);
8762            Bytes::new(&payload_buf)
8763        } else {
8764            Bytes::new(__input)
8765        };
8766        let mut __struct = Self::default();
8767        __struct.gcs_system_id = buf.get_u8();
8768        __struct.control_request = buf.get_u8();
8769        __struct.ack = buf.get_u8();
8770        Ok(__struct)
8771    }
8772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8773        let mut __tmp = BytesMut::new(bytes);
8774        #[allow(clippy::absurd_extreme_comparisons)]
8775        #[allow(unused_comparisons)]
8776        if __tmp.remaining() < Self::ENCODED_LEN {
8777            panic!(
8778                "buffer is too small (need {} bytes, but got {})",
8779                Self::ENCODED_LEN,
8780                __tmp.remaining(),
8781            )
8782        }
8783        __tmp.put_u8(self.gcs_system_id);
8784        __tmp.put_u8(self.control_request);
8785        __tmp.put_u8(self.ack);
8786        if matches!(version, MavlinkVersion::V2) {
8787            let len = __tmp.len();
8788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8789        } else {
8790            __tmp.len()
8791        }
8792    }
8793}
8794#[doc = "Information about a potential collision."]
8795#[doc = ""]
8796#[doc = "ID: 247"]
8797#[derive(Debug, Clone, PartialEq)]
8798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8800#[cfg_attr(feature = "ts", derive(TS))]
8801#[cfg_attr(feature = "ts", ts(export))]
8802pub struct COLLISION_DATA {
8803    #[doc = "Unique identifier, domain based on src field"]
8804    pub id: u32,
8805    #[doc = "Estimated time until collision occurs"]
8806    pub time_to_minimum_delta: f32,
8807    #[doc = "Closest vertical distance between vehicle and object"]
8808    pub altitude_minimum_delta: f32,
8809    #[doc = "Closest horizontal distance between vehicle and object"]
8810    pub horizontal_minimum_delta: f32,
8811    #[doc = "Collision data source"]
8812    pub src: MavCollisionSrc,
8813    #[doc = "Action that is being taken to avoid this collision"]
8814    pub action: MavCollisionAction,
8815    #[doc = "How concerned the aircraft is about this collision"]
8816    pub threat_level: MavCollisionThreatLevel,
8817}
8818impl COLLISION_DATA {
8819    pub const ENCODED_LEN: usize = 19usize;
8820    pub const DEFAULT: Self = Self {
8821        id: 0_u32,
8822        time_to_minimum_delta: 0.0_f32,
8823        altitude_minimum_delta: 0.0_f32,
8824        horizontal_minimum_delta: 0.0_f32,
8825        src: MavCollisionSrc::DEFAULT,
8826        action: MavCollisionAction::DEFAULT,
8827        threat_level: MavCollisionThreatLevel::DEFAULT,
8828    };
8829    #[cfg(feature = "arbitrary")]
8830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8831        use arbitrary::{Arbitrary, Unstructured};
8832        let mut buf = [0u8; 1024];
8833        rng.fill_bytes(&mut buf);
8834        let mut unstructured = Unstructured::new(&buf);
8835        Self::arbitrary(&mut unstructured).unwrap_or_default()
8836    }
8837}
8838impl Default for COLLISION_DATA {
8839    fn default() -> Self {
8840        Self::DEFAULT.clone()
8841    }
8842}
8843impl MessageData for COLLISION_DATA {
8844    type Message = MavMessage;
8845    const ID: u32 = 247u32;
8846    const NAME: &'static str = "COLLISION";
8847    const EXTRA_CRC: u8 = 81u8;
8848    const ENCODED_LEN: usize = 19usize;
8849    fn deser(
8850        _version: MavlinkVersion,
8851        __input: &[u8],
8852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8853        let avail_len = __input.len();
8854        let mut payload_buf = [0; Self::ENCODED_LEN];
8855        let mut buf = if avail_len < Self::ENCODED_LEN {
8856            payload_buf[0..avail_len].copy_from_slice(__input);
8857            Bytes::new(&payload_buf)
8858        } else {
8859            Bytes::new(__input)
8860        };
8861        let mut __struct = Self::default();
8862        __struct.id = buf.get_u32_le();
8863        __struct.time_to_minimum_delta = buf.get_f32_le();
8864        __struct.altitude_minimum_delta = buf.get_f32_le();
8865        __struct.horizontal_minimum_delta = buf.get_f32_le();
8866        let tmp = buf.get_u8();
8867        __struct.src =
8868            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8869                enum_type: "MavCollisionSrc",
8870                value: tmp as u32,
8871            })?;
8872        let tmp = buf.get_u8();
8873        __struct.action =
8874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8875                enum_type: "MavCollisionAction",
8876                value: tmp as u32,
8877            })?;
8878        let tmp = buf.get_u8();
8879        __struct.threat_level =
8880            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8881                enum_type: "MavCollisionThreatLevel",
8882                value: tmp as u32,
8883            })?;
8884        Ok(__struct)
8885    }
8886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8887        let mut __tmp = BytesMut::new(bytes);
8888        #[allow(clippy::absurd_extreme_comparisons)]
8889        #[allow(unused_comparisons)]
8890        if __tmp.remaining() < Self::ENCODED_LEN {
8891            panic!(
8892                "buffer is too small (need {} bytes, but got {})",
8893                Self::ENCODED_LEN,
8894                __tmp.remaining(),
8895            )
8896        }
8897        __tmp.put_u32_le(self.id);
8898        __tmp.put_f32_le(self.time_to_minimum_delta);
8899        __tmp.put_f32_le(self.altitude_minimum_delta);
8900        __tmp.put_f32_le(self.horizontal_minimum_delta);
8901        __tmp.put_u8(self.src as u8);
8902        __tmp.put_u8(self.action as u8);
8903        __tmp.put_u8(self.threat_level as u8);
8904        if matches!(version, MavlinkVersion::V2) {
8905            let len = __tmp.len();
8906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8907        } else {
8908            __tmp.len()
8909        }
8910    }
8911}
8912#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8913#[doc = ""]
8914#[doc = "ID: 77"]
8915#[derive(Debug, Clone, PartialEq)]
8916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8918#[cfg_attr(feature = "ts", derive(TS))]
8919#[cfg_attr(feature = "ts", ts(export))]
8920pub struct COMMAND_ACK_DATA {
8921    #[doc = "Command ID (of acknowledged command)."]
8922    pub command: MavCmd,
8923    #[doc = "Result of command."]
8924    pub result: MavResult,
8925    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8927    pub progress: u8,
8928    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8930    pub result_param2: i32,
8931    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8933    pub target_system: u8,
8934    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8936    pub target_component: u8,
8937}
8938impl COMMAND_ACK_DATA {
8939    pub const ENCODED_LEN: usize = 10usize;
8940    pub const DEFAULT: Self = Self {
8941        command: MavCmd::DEFAULT,
8942        result: MavResult::DEFAULT,
8943        progress: 0_u8,
8944        result_param2: 0_i32,
8945        target_system: 0_u8,
8946        target_component: 0_u8,
8947    };
8948    #[cfg(feature = "arbitrary")]
8949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8950        use arbitrary::{Arbitrary, Unstructured};
8951        let mut buf = [0u8; 1024];
8952        rng.fill_bytes(&mut buf);
8953        let mut unstructured = Unstructured::new(&buf);
8954        Self::arbitrary(&mut unstructured).unwrap_or_default()
8955    }
8956}
8957impl Default for COMMAND_ACK_DATA {
8958    fn default() -> Self {
8959        Self::DEFAULT.clone()
8960    }
8961}
8962impl MessageData for COMMAND_ACK_DATA {
8963    type Message = MavMessage;
8964    const ID: u32 = 77u32;
8965    const NAME: &'static str = "COMMAND_ACK";
8966    const EXTRA_CRC: u8 = 143u8;
8967    const ENCODED_LEN: usize = 10usize;
8968    fn deser(
8969        _version: MavlinkVersion,
8970        __input: &[u8],
8971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8972        let avail_len = __input.len();
8973        let mut payload_buf = [0; Self::ENCODED_LEN];
8974        let mut buf = if avail_len < Self::ENCODED_LEN {
8975            payload_buf[0..avail_len].copy_from_slice(__input);
8976            Bytes::new(&payload_buf)
8977        } else {
8978            Bytes::new(__input)
8979        };
8980        let mut __struct = Self::default();
8981        let tmp = buf.get_u16_le();
8982        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8983            ::mavlink_core::error::ParserError::InvalidEnum {
8984                enum_type: "MavCmd",
8985                value: tmp as u32,
8986            },
8987        )?;
8988        let tmp = buf.get_u8();
8989        __struct.result =
8990            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8991                enum_type: "MavResult",
8992                value: tmp as u32,
8993            })?;
8994        __struct.progress = buf.get_u8();
8995        __struct.result_param2 = buf.get_i32_le();
8996        __struct.target_system = buf.get_u8();
8997        __struct.target_component = buf.get_u8();
8998        Ok(__struct)
8999    }
9000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9001        let mut __tmp = BytesMut::new(bytes);
9002        #[allow(clippy::absurd_extreme_comparisons)]
9003        #[allow(unused_comparisons)]
9004        if __tmp.remaining() < Self::ENCODED_LEN {
9005            panic!(
9006                "buffer is too small (need {} bytes, but got {})",
9007                Self::ENCODED_LEN,
9008                __tmp.remaining(),
9009            )
9010        }
9011        __tmp.put_u16_le(self.command as u16);
9012        __tmp.put_u8(self.result as u8);
9013        if matches!(version, MavlinkVersion::V2) {
9014            __tmp.put_u8(self.progress);
9015            __tmp.put_i32_le(self.result_param2);
9016            __tmp.put_u8(self.target_system);
9017            __tmp.put_u8(self.target_component);
9018            let len = __tmp.len();
9019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9020        } else {
9021            __tmp.len()
9022        }
9023    }
9024}
9025#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9026#[doc = ""]
9027#[doc = "ID: 80"]
9028#[derive(Debug, Clone, PartialEq)]
9029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9031#[cfg_attr(feature = "ts", derive(TS))]
9032#[cfg_attr(feature = "ts", ts(export))]
9033pub struct COMMAND_CANCEL_DATA {
9034    #[doc = "Command ID (of command to cancel)."]
9035    pub command: MavCmd,
9036    #[doc = "System executing long running command. Should not be broadcast (0)."]
9037    pub target_system: u8,
9038    #[doc = "Component executing long running command."]
9039    pub target_component: u8,
9040}
9041impl COMMAND_CANCEL_DATA {
9042    pub const ENCODED_LEN: usize = 4usize;
9043    pub const DEFAULT: Self = Self {
9044        command: MavCmd::DEFAULT,
9045        target_system: 0_u8,
9046        target_component: 0_u8,
9047    };
9048    #[cfg(feature = "arbitrary")]
9049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9050        use arbitrary::{Arbitrary, Unstructured};
9051        let mut buf = [0u8; 1024];
9052        rng.fill_bytes(&mut buf);
9053        let mut unstructured = Unstructured::new(&buf);
9054        Self::arbitrary(&mut unstructured).unwrap_or_default()
9055    }
9056}
9057impl Default for COMMAND_CANCEL_DATA {
9058    fn default() -> Self {
9059        Self::DEFAULT.clone()
9060    }
9061}
9062impl MessageData for COMMAND_CANCEL_DATA {
9063    type Message = MavMessage;
9064    const ID: u32 = 80u32;
9065    const NAME: &'static str = "COMMAND_CANCEL";
9066    const EXTRA_CRC: u8 = 14u8;
9067    const ENCODED_LEN: usize = 4usize;
9068    fn deser(
9069        _version: MavlinkVersion,
9070        __input: &[u8],
9071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9072        let avail_len = __input.len();
9073        let mut payload_buf = [0; Self::ENCODED_LEN];
9074        let mut buf = if avail_len < Self::ENCODED_LEN {
9075            payload_buf[0..avail_len].copy_from_slice(__input);
9076            Bytes::new(&payload_buf)
9077        } else {
9078            Bytes::new(__input)
9079        };
9080        let mut __struct = Self::default();
9081        let tmp = buf.get_u16_le();
9082        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9083            ::mavlink_core::error::ParserError::InvalidEnum {
9084                enum_type: "MavCmd",
9085                value: tmp as u32,
9086            },
9087        )?;
9088        __struct.target_system = buf.get_u8();
9089        __struct.target_component = buf.get_u8();
9090        Ok(__struct)
9091    }
9092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9093        let mut __tmp = BytesMut::new(bytes);
9094        #[allow(clippy::absurd_extreme_comparisons)]
9095        #[allow(unused_comparisons)]
9096        if __tmp.remaining() < Self::ENCODED_LEN {
9097            panic!(
9098                "buffer is too small (need {} bytes, but got {})",
9099                Self::ENCODED_LEN,
9100                __tmp.remaining(),
9101            )
9102        }
9103        __tmp.put_u16_le(self.command as u16);
9104        __tmp.put_u8(self.target_system);
9105        __tmp.put_u8(self.target_component);
9106        if matches!(version, MavlinkVersion::V2) {
9107            let len = __tmp.len();
9108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9109        } else {
9110            __tmp.len()
9111        }
9112    }
9113}
9114#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9115#[doc = ""]
9116#[doc = "ID: 75"]
9117#[derive(Debug, Clone, PartialEq)]
9118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9120#[cfg_attr(feature = "ts", derive(TS))]
9121#[cfg_attr(feature = "ts", ts(export))]
9122pub struct COMMAND_INT_DATA {
9123    #[doc = "PARAM1, see MAV_CMD enum"]
9124    pub param1: f32,
9125    #[doc = "PARAM2, see MAV_CMD enum"]
9126    pub param2: f32,
9127    #[doc = "PARAM3, see MAV_CMD enum"]
9128    pub param3: f32,
9129    #[doc = "PARAM4, see MAV_CMD enum"]
9130    pub param4: f32,
9131    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9132    pub x: i32,
9133    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9134    pub y: i32,
9135    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9136    pub z: f32,
9137    #[doc = "The scheduled action for the mission item."]
9138    pub command: MavCmd,
9139    #[doc = "System ID"]
9140    pub target_system: u8,
9141    #[doc = "Component ID"]
9142    pub target_component: u8,
9143    #[doc = "The coordinate system of the COMMAND."]
9144    pub frame: MavFrame,
9145    #[doc = "Not used."]
9146    pub current: u8,
9147    #[doc = "Not used (set 0)."]
9148    pub autocontinue: u8,
9149}
9150impl COMMAND_INT_DATA {
9151    pub const ENCODED_LEN: usize = 35usize;
9152    pub const DEFAULT: Self = Self {
9153        param1: 0.0_f32,
9154        param2: 0.0_f32,
9155        param3: 0.0_f32,
9156        param4: 0.0_f32,
9157        x: 0_i32,
9158        y: 0_i32,
9159        z: 0.0_f32,
9160        command: MavCmd::DEFAULT,
9161        target_system: 0_u8,
9162        target_component: 0_u8,
9163        frame: MavFrame::DEFAULT,
9164        current: 0_u8,
9165        autocontinue: 0_u8,
9166    };
9167    #[cfg(feature = "arbitrary")]
9168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9169        use arbitrary::{Arbitrary, Unstructured};
9170        let mut buf = [0u8; 1024];
9171        rng.fill_bytes(&mut buf);
9172        let mut unstructured = Unstructured::new(&buf);
9173        Self::arbitrary(&mut unstructured).unwrap_or_default()
9174    }
9175}
9176impl Default for COMMAND_INT_DATA {
9177    fn default() -> Self {
9178        Self::DEFAULT.clone()
9179    }
9180}
9181impl MessageData for COMMAND_INT_DATA {
9182    type Message = MavMessage;
9183    const ID: u32 = 75u32;
9184    const NAME: &'static str = "COMMAND_INT";
9185    const EXTRA_CRC: u8 = 158u8;
9186    const ENCODED_LEN: usize = 35usize;
9187    fn deser(
9188        _version: MavlinkVersion,
9189        __input: &[u8],
9190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9191        let avail_len = __input.len();
9192        let mut payload_buf = [0; Self::ENCODED_LEN];
9193        let mut buf = if avail_len < Self::ENCODED_LEN {
9194            payload_buf[0..avail_len].copy_from_slice(__input);
9195            Bytes::new(&payload_buf)
9196        } else {
9197            Bytes::new(__input)
9198        };
9199        let mut __struct = Self::default();
9200        __struct.param1 = buf.get_f32_le();
9201        __struct.param2 = buf.get_f32_le();
9202        __struct.param3 = buf.get_f32_le();
9203        __struct.param4 = buf.get_f32_le();
9204        __struct.x = buf.get_i32_le();
9205        __struct.y = buf.get_i32_le();
9206        __struct.z = buf.get_f32_le();
9207        let tmp = buf.get_u16_le();
9208        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9209            ::mavlink_core::error::ParserError::InvalidEnum {
9210                enum_type: "MavCmd",
9211                value: tmp as u32,
9212            },
9213        )?;
9214        __struct.target_system = buf.get_u8();
9215        __struct.target_component = buf.get_u8();
9216        let tmp = buf.get_u8();
9217        __struct.frame =
9218            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9219                enum_type: "MavFrame",
9220                value: tmp as u32,
9221            })?;
9222        __struct.current = buf.get_u8();
9223        __struct.autocontinue = buf.get_u8();
9224        Ok(__struct)
9225    }
9226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9227        let mut __tmp = BytesMut::new(bytes);
9228        #[allow(clippy::absurd_extreme_comparisons)]
9229        #[allow(unused_comparisons)]
9230        if __tmp.remaining() < Self::ENCODED_LEN {
9231            panic!(
9232                "buffer is too small (need {} bytes, but got {})",
9233                Self::ENCODED_LEN,
9234                __tmp.remaining(),
9235            )
9236        }
9237        __tmp.put_f32_le(self.param1);
9238        __tmp.put_f32_le(self.param2);
9239        __tmp.put_f32_le(self.param3);
9240        __tmp.put_f32_le(self.param4);
9241        __tmp.put_i32_le(self.x);
9242        __tmp.put_i32_le(self.y);
9243        __tmp.put_f32_le(self.z);
9244        __tmp.put_u16_le(self.command as u16);
9245        __tmp.put_u8(self.target_system);
9246        __tmp.put_u8(self.target_component);
9247        __tmp.put_u8(self.frame as u8);
9248        __tmp.put_u8(self.current);
9249        __tmp.put_u8(self.autocontinue);
9250        if matches!(version, MavlinkVersion::V2) {
9251            let len = __tmp.len();
9252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9253        } else {
9254            __tmp.len()
9255        }
9256    }
9257}
9258#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9259#[doc = ""]
9260#[doc = "ID: 76"]
9261#[derive(Debug, Clone, PartialEq)]
9262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9264#[cfg_attr(feature = "ts", derive(TS))]
9265#[cfg_attr(feature = "ts", ts(export))]
9266pub struct COMMAND_LONG_DATA {
9267    #[doc = "Parameter 1 (for the specific command)."]
9268    pub param1: f32,
9269    #[doc = "Parameter 2 (for the specific command)."]
9270    pub param2: f32,
9271    #[doc = "Parameter 3 (for the specific command)."]
9272    pub param3: f32,
9273    #[doc = "Parameter 4 (for the specific command)."]
9274    pub param4: f32,
9275    #[doc = "Parameter 5 (for the specific command)."]
9276    pub param5: f32,
9277    #[doc = "Parameter 6 (for the specific command)."]
9278    pub param6: f32,
9279    #[doc = "Parameter 7 (for the specific command)."]
9280    pub param7: f32,
9281    #[doc = "Command ID (of command to send)."]
9282    pub command: MavCmd,
9283    #[doc = "System which should execute the command"]
9284    pub target_system: u8,
9285    #[doc = "Component which should execute the command, 0 for all components"]
9286    pub target_component: u8,
9287    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9288    pub confirmation: u8,
9289}
9290impl COMMAND_LONG_DATA {
9291    pub const ENCODED_LEN: usize = 33usize;
9292    pub const DEFAULT: Self = Self {
9293        param1: 0.0_f32,
9294        param2: 0.0_f32,
9295        param3: 0.0_f32,
9296        param4: 0.0_f32,
9297        param5: 0.0_f32,
9298        param6: 0.0_f32,
9299        param7: 0.0_f32,
9300        command: MavCmd::DEFAULT,
9301        target_system: 0_u8,
9302        target_component: 0_u8,
9303        confirmation: 0_u8,
9304    };
9305    #[cfg(feature = "arbitrary")]
9306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9307        use arbitrary::{Arbitrary, Unstructured};
9308        let mut buf = [0u8; 1024];
9309        rng.fill_bytes(&mut buf);
9310        let mut unstructured = Unstructured::new(&buf);
9311        Self::arbitrary(&mut unstructured).unwrap_or_default()
9312    }
9313}
9314impl Default for COMMAND_LONG_DATA {
9315    fn default() -> Self {
9316        Self::DEFAULT.clone()
9317    }
9318}
9319impl MessageData for COMMAND_LONG_DATA {
9320    type Message = MavMessage;
9321    const ID: u32 = 76u32;
9322    const NAME: &'static str = "COMMAND_LONG";
9323    const EXTRA_CRC: u8 = 152u8;
9324    const ENCODED_LEN: usize = 33usize;
9325    fn deser(
9326        _version: MavlinkVersion,
9327        __input: &[u8],
9328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9329        let avail_len = __input.len();
9330        let mut payload_buf = [0; Self::ENCODED_LEN];
9331        let mut buf = if avail_len < Self::ENCODED_LEN {
9332            payload_buf[0..avail_len].copy_from_slice(__input);
9333            Bytes::new(&payload_buf)
9334        } else {
9335            Bytes::new(__input)
9336        };
9337        let mut __struct = Self::default();
9338        __struct.param1 = buf.get_f32_le();
9339        __struct.param2 = buf.get_f32_le();
9340        __struct.param3 = buf.get_f32_le();
9341        __struct.param4 = buf.get_f32_le();
9342        __struct.param5 = buf.get_f32_le();
9343        __struct.param6 = buf.get_f32_le();
9344        __struct.param7 = buf.get_f32_le();
9345        let tmp = buf.get_u16_le();
9346        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9347            ::mavlink_core::error::ParserError::InvalidEnum {
9348                enum_type: "MavCmd",
9349                value: tmp as u32,
9350            },
9351        )?;
9352        __struct.target_system = buf.get_u8();
9353        __struct.target_component = buf.get_u8();
9354        __struct.confirmation = buf.get_u8();
9355        Ok(__struct)
9356    }
9357    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9358        let mut __tmp = BytesMut::new(bytes);
9359        #[allow(clippy::absurd_extreme_comparisons)]
9360        #[allow(unused_comparisons)]
9361        if __tmp.remaining() < Self::ENCODED_LEN {
9362            panic!(
9363                "buffer is too small (need {} bytes, but got {})",
9364                Self::ENCODED_LEN,
9365                __tmp.remaining(),
9366            )
9367        }
9368        __tmp.put_f32_le(self.param1);
9369        __tmp.put_f32_le(self.param2);
9370        __tmp.put_f32_le(self.param3);
9371        __tmp.put_f32_le(self.param4);
9372        __tmp.put_f32_le(self.param5);
9373        __tmp.put_f32_le(self.param6);
9374        __tmp.put_f32_le(self.param7);
9375        __tmp.put_u16_le(self.command as u16);
9376        __tmp.put_u8(self.target_system);
9377        __tmp.put_u8(self.target_component);
9378        __tmp.put_u8(self.confirmation);
9379        if matches!(version, MavlinkVersion::V2) {
9380            let len = __tmp.len();
9381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9382        } else {
9383            __tmp.len()
9384        }
9385    }
9386}
9387#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9388#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9389#[doc = ""]
9390#[doc = "ID: 395"]
9391#[derive(Debug, Clone, PartialEq)]
9392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9394#[cfg_attr(feature = "ts", derive(TS))]
9395#[cfg_attr(feature = "ts", ts(export))]
9396pub struct COMPONENT_INFORMATION_DATA {
9397    #[doc = "Timestamp (time since system boot)."]
9398    pub time_boot_ms: u32,
9399    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9400    pub general_metadata_file_crc: u32,
9401    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9402    pub peripherals_metadata_file_crc: u32,
9403    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9404    #[cfg_attr(feature = "ts", ts(type = "string"))]
9405    pub general_metadata_uri: CharArray<100>,
9406    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9407    #[cfg_attr(feature = "ts", ts(type = "string"))]
9408    pub peripherals_metadata_uri: CharArray<100>,
9409}
9410impl COMPONENT_INFORMATION_DATA {
9411    pub const ENCODED_LEN: usize = 212usize;
9412    pub const DEFAULT: Self = Self {
9413        time_boot_ms: 0_u32,
9414        general_metadata_file_crc: 0_u32,
9415        peripherals_metadata_file_crc: 0_u32,
9416        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9417        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9418    };
9419    #[cfg(feature = "arbitrary")]
9420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9421        use arbitrary::{Arbitrary, Unstructured};
9422        let mut buf = [0u8; 1024];
9423        rng.fill_bytes(&mut buf);
9424        let mut unstructured = Unstructured::new(&buf);
9425        Self::arbitrary(&mut unstructured).unwrap_or_default()
9426    }
9427}
9428impl Default for COMPONENT_INFORMATION_DATA {
9429    fn default() -> Self {
9430        Self::DEFAULT.clone()
9431    }
9432}
9433impl MessageData for COMPONENT_INFORMATION_DATA {
9434    type Message = MavMessage;
9435    const ID: u32 = 395u32;
9436    const NAME: &'static str = "COMPONENT_INFORMATION";
9437    const EXTRA_CRC: u8 = 0u8;
9438    const ENCODED_LEN: usize = 212usize;
9439    fn deser(
9440        _version: MavlinkVersion,
9441        __input: &[u8],
9442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9443        let avail_len = __input.len();
9444        let mut payload_buf = [0; Self::ENCODED_LEN];
9445        let mut buf = if avail_len < Self::ENCODED_LEN {
9446            payload_buf[0..avail_len].copy_from_slice(__input);
9447            Bytes::new(&payload_buf)
9448        } else {
9449            Bytes::new(__input)
9450        };
9451        let mut __struct = Self::default();
9452        __struct.time_boot_ms = buf.get_u32_le();
9453        __struct.general_metadata_file_crc = buf.get_u32_le();
9454        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9455        let mut tmp = [0_u8; 100usize];
9456        for v in &mut tmp {
9457            *v = buf.get_u8();
9458        }
9459        __struct.general_metadata_uri = CharArray::new(tmp);
9460        let mut tmp = [0_u8; 100usize];
9461        for v in &mut tmp {
9462            *v = buf.get_u8();
9463        }
9464        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9465        Ok(__struct)
9466    }
9467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9468        let mut __tmp = BytesMut::new(bytes);
9469        #[allow(clippy::absurd_extreme_comparisons)]
9470        #[allow(unused_comparisons)]
9471        if __tmp.remaining() < Self::ENCODED_LEN {
9472            panic!(
9473                "buffer is too small (need {} bytes, but got {})",
9474                Self::ENCODED_LEN,
9475                __tmp.remaining(),
9476            )
9477        }
9478        __tmp.put_u32_le(self.time_boot_ms);
9479        __tmp.put_u32_le(self.general_metadata_file_crc);
9480        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9481        for val in &self.general_metadata_uri {
9482            __tmp.put_u8(*val);
9483        }
9484        for val in &self.peripherals_metadata_uri {
9485            __tmp.put_u8(*val);
9486        }
9487        if matches!(version, MavlinkVersion::V2) {
9488            let len = __tmp.len();
9489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9490        } else {
9491            __tmp.len()
9492        }
9493    }
9494}
9495#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9496#[doc = ""]
9497#[doc = "ID: 396"]
9498#[derive(Debug, Clone, PartialEq)]
9499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9501#[cfg_attr(feature = "ts", derive(TS))]
9502#[cfg_attr(feature = "ts", ts(export))]
9503pub struct COMPONENT_INFORMATION_BASIC_DATA {
9504    #[doc = "Component capability flags"]
9505    pub capabilities: MavProtocolCapability,
9506    #[doc = "Timestamp (time since system boot)."]
9507    pub time_boot_ms: u32,
9508    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9509    pub time_manufacture_s: u32,
9510    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9511    #[cfg_attr(feature = "ts", ts(type = "string"))]
9512    pub vendor_name: CharArray<32>,
9513    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9514    #[cfg_attr(feature = "ts", ts(type = "string"))]
9515    pub model_name: CharArray<32>,
9516    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9517    #[cfg_attr(feature = "ts", ts(type = "string"))]
9518    pub software_version: CharArray<24>,
9519    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9520    #[cfg_attr(feature = "ts", ts(type = "string"))]
9521    pub hardware_version: CharArray<24>,
9522    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9523    #[cfg_attr(feature = "ts", ts(type = "string"))]
9524    pub serial_number: CharArray<32>,
9525}
9526impl COMPONENT_INFORMATION_BASIC_DATA {
9527    pub const ENCODED_LEN: usize = 160usize;
9528    pub const DEFAULT: Self = Self {
9529        capabilities: MavProtocolCapability::DEFAULT,
9530        time_boot_ms: 0_u32,
9531        time_manufacture_s: 0_u32,
9532        vendor_name: CharArray::new([0_u8; 32usize]),
9533        model_name: CharArray::new([0_u8; 32usize]),
9534        software_version: CharArray::new([0_u8; 24usize]),
9535        hardware_version: CharArray::new([0_u8; 24usize]),
9536        serial_number: CharArray::new([0_u8; 32usize]),
9537    };
9538    #[cfg(feature = "arbitrary")]
9539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9540        use arbitrary::{Arbitrary, Unstructured};
9541        let mut buf = [0u8; 1024];
9542        rng.fill_bytes(&mut buf);
9543        let mut unstructured = Unstructured::new(&buf);
9544        Self::arbitrary(&mut unstructured).unwrap_or_default()
9545    }
9546}
9547impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9548    fn default() -> Self {
9549        Self::DEFAULT.clone()
9550    }
9551}
9552impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9553    type Message = MavMessage;
9554    const ID: u32 = 396u32;
9555    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9556    const EXTRA_CRC: u8 = 50u8;
9557    const ENCODED_LEN: usize = 160usize;
9558    fn deser(
9559        _version: MavlinkVersion,
9560        __input: &[u8],
9561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9562        let avail_len = __input.len();
9563        let mut payload_buf = [0; Self::ENCODED_LEN];
9564        let mut buf = if avail_len < Self::ENCODED_LEN {
9565            payload_buf[0..avail_len].copy_from_slice(__input);
9566            Bytes::new(&payload_buf)
9567        } else {
9568            Bytes::new(__input)
9569        };
9570        let mut __struct = Self::default();
9571        let tmp = buf.get_u64_le();
9572        __struct.capabilities = MavProtocolCapability::from_bits(
9573            tmp & MavProtocolCapability::all().bits(),
9574        )
9575        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9576            flag_type: "MavProtocolCapability",
9577            value: tmp as u32,
9578        })?;
9579        __struct.time_boot_ms = buf.get_u32_le();
9580        __struct.time_manufacture_s = buf.get_u32_le();
9581        let mut tmp = [0_u8; 32usize];
9582        for v in &mut tmp {
9583            *v = buf.get_u8();
9584        }
9585        __struct.vendor_name = CharArray::new(tmp);
9586        let mut tmp = [0_u8; 32usize];
9587        for v in &mut tmp {
9588            *v = buf.get_u8();
9589        }
9590        __struct.model_name = CharArray::new(tmp);
9591        let mut tmp = [0_u8; 24usize];
9592        for v in &mut tmp {
9593            *v = buf.get_u8();
9594        }
9595        __struct.software_version = CharArray::new(tmp);
9596        let mut tmp = [0_u8; 24usize];
9597        for v in &mut tmp {
9598            *v = buf.get_u8();
9599        }
9600        __struct.hardware_version = CharArray::new(tmp);
9601        let mut tmp = [0_u8; 32usize];
9602        for v in &mut tmp {
9603            *v = buf.get_u8();
9604        }
9605        __struct.serial_number = CharArray::new(tmp);
9606        Ok(__struct)
9607    }
9608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9609        let mut __tmp = BytesMut::new(bytes);
9610        #[allow(clippy::absurd_extreme_comparisons)]
9611        #[allow(unused_comparisons)]
9612        if __tmp.remaining() < Self::ENCODED_LEN {
9613            panic!(
9614                "buffer is too small (need {} bytes, but got {})",
9615                Self::ENCODED_LEN,
9616                __tmp.remaining(),
9617            )
9618        }
9619        __tmp.put_u64_le(self.capabilities.bits());
9620        __tmp.put_u32_le(self.time_boot_ms);
9621        __tmp.put_u32_le(self.time_manufacture_s);
9622        for val in &self.vendor_name {
9623            __tmp.put_u8(*val);
9624        }
9625        for val in &self.model_name {
9626            __tmp.put_u8(*val);
9627        }
9628        for val in &self.software_version {
9629            __tmp.put_u8(*val);
9630        }
9631        for val in &self.hardware_version {
9632            __tmp.put_u8(*val);
9633        }
9634        for val in &self.serial_number {
9635            __tmp.put_u8(*val);
9636        }
9637        if matches!(version, MavlinkVersion::V2) {
9638            let len = __tmp.len();
9639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9640        } else {
9641            __tmp.len()
9642        }
9643    }
9644}
9645#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9646#[doc = ""]
9647#[doc = "ID: 397"]
9648#[derive(Debug, Clone, PartialEq)]
9649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9651#[cfg_attr(feature = "ts", derive(TS))]
9652#[cfg_attr(feature = "ts", ts(export))]
9653pub struct COMPONENT_METADATA_DATA {
9654    #[doc = "Timestamp (time since system boot)."]
9655    pub time_boot_ms: u32,
9656    #[doc = "CRC32 of the general metadata file."]
9657    pub file_crc: u32,
9658    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9659    #[cfg_attr(feature = "ts", ts(type = "string"))]
9660    pub uri: CharArray<100>,
9661}
9662impl COMPONENT_METADATA_DATA {
9663    pub const ENCODED_LEN: usize = 108usize;
9664    pub const DEFAULT: Self = Self {
9665        time_boot_ms: 0_u32,
9666        file_crc: 0_u32,
9667        uri: CharArray::new([0_u8; 100usize]),
9668    };
9669    #[cfg(feature = "arbitrary")]
9670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9671        use arbitrary::{Arbitrary, Unstructured};
9672        let mut buf = [0u8; 1024];
9673        rng.fill_bytes(&mut buf);
9674        let mut unstructured = Unstructured::new(&buf);
9675        Self::arbitrary(&mut unstructured).unwrap_or_default()
9676    }
9677}
9678impl Default for COMPONENT_METADATA_DATA {
9679    fn default() -> Self {
9680        Self::DEFAULT.clone()
9681    }
9682}
9683impl MessageData for COMPONENT_METADATA_DATA {
9684    type Message = MavMessage;
9685    const ID: u32 = 397u32;
9686    const NAME: &'static str = "COMPONENT_METADATA";
9687    const EXTRA_CRC: u8 = 182u8;
9688    const ENCODED_LEN: usize = 108usize;
9689    fn deser(
9690        _version: MavlinkVersion,
9691        __input: &[u8],
9692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9693        let avail_len = __input.len();
9694        let mut payload_buf = [0; Self::ENCODED_LEN];
9695        let mut buf = if avail_len < Self::ENCODED_LEN {
9696            payload_buf[0..avail_len].copy_from_slice(__input);
9697            Bytes::new(&payload_buf)
9698        } else {
9699            Bytes::new(__input)
9700        };
9701        let mut __struct = Self::default();
9702        __struct.time_boot_ms = buf.get_u32_le();
9703        __struct.file_crc = buf.get_u32_le();
9704        let mut tmp = [0_u8; 100usize];
9705        for v in &mut tmp {
9706            *v = buf.get_u8();
9707        }
9708        __struct.uri = CharArray::new(tmp);
9709        Ok(__struct)
9710    }
9711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9712        let mut __tmp = BytesMut::new(bytes);
9713        #[allow(clippy::absurd_extreme_comparisons)]
9714        #[allow(unused_comparisons)]
9715        if __tmp.remaining() < Self::ENCODED_LEN {
9716            panic!(
9717                "buffer is too small (need {} bytes, but got {})",
9718                Self::ENCODED_LEN,
9719                __tmp.remaining(),
9720            )
9721        }
9722        __tmp.put_u32_le(self.time_boot_ms);
9723        __tmp.put_u32_le(self.file_crc);
9724        for val in &self.uri {
9725            __tmp.put_u8(*val);
9726        }
9727        if matches!(version, MavlinkVersion::V2) {
9728            let len = __tmp.len();
9729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9730        } else {
9731            __tmp.len()
9732        }
9733    }
9734}
9735#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9736#[doc = ""]
9737#[doc = "ID: 146"]
9738#[derive(Debug, Clone, PartialEq)]
9739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9741#[cfg_attr(feature = "ts", derive(TS))]
9742#[cfg_attr(feature = "ts", ts(export))]
9743pub struct CONTROL_SYSTEM_STATE_DATA {
9744    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9745    pub time_usec: u64,
9746    #[doc = "X acceleration in body frame"]
9747    pub x_acc: f32,
9748    #[doc = "Y acceleration in body frame"]
9749    pub y_acc: f32,
9750    #[doc = "Z acceleration in body frame"]
9751    pub z_acc: f32,
9752    #[doc = "X velocity in body frame"]
9753    pub x_vel: f32,
9754    #[doc = "Y velocity in body frame"]
9755    pub y_vel: f32,
9756    #[doc = "Z velocity in body frame"]
9757    pub z_vel: f32,
9758    #[doc = "X position in local frame"]
9759    pub x_pos: f32,
9760    #[doc = "Y position in local frame"]
9761    pub y_pos: f32,
9762    #[doc = "Z position in local frame"]
9763    pub z_pos: f32,
9764    #[doc = "Airspeed, set to -1 if unknown"]
9765    pub airspeed: f32,
9766    #[doc = "Variance of body velocity estimate"]
9767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9768    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9769    pub vel_variance: [f32; 3],
9770    #[doc = "Variance in local position"]
9771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9773    pub pos_variance: [f32; 3],
9774    #[doc = "The attitude, represented as Quaternion"]
9775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9777    pub q: [f32; 4],
9778    #[doc = "Angular rate in roll axis"]
9779    pub roll_rate: f32,
9780    #[doc = "Angular rate in pitch axis"]
9781    pub pitch_rate: f32,
9782    #[doc = "Angular rate in yaw axis"]
9783    pub yaw_rate: f32,
9784}
9785impl CONTROL_SYSTEM_STATE_DATA {
9786    pub const ENCODED_LEN: usize = 100usize;
9787    pub const DEFAULT: Self = Self {
9788        time_usec: 0_u64,
9789        x_acc: 0.0_f32,
9790        y_acc: 0.0_f32,
9791        z_acc: 0.0_f32,
9792        x_vel: 0.0_f32,
9793        y_vel: 0.0_f32,
9794        z_vel: 0.0_f32,
9795        x_pos: 0.0_f32,
9796        y_pos: 0.0_f32,
9797        z_pos: 0.0_f32,
9798        airspeed: 0.0_f32,
9799        vel_variance: [0.0_f32; 3usize],
9800        pos_variance: [0.0_f32; 3usize],
9801        q: [0.0_f32; 4usize],
9802        roll_rate: 0.0_f32,
9803        pitch_rate: 0.0_f32,
9804        yaw_rate: 0.0_f32,
9805    };
9806    #[cfg(feature = "arbitrary")]
9807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9808        use arbitrary::{Arbitrary, Unstructured};
9809        let mut buf = [0u8; 1024];
9810        rng.fill_bytes(&mut buf);
9811        let mut unstructured = Unstructured::new(&buf);
9812        Self::arbitrary(&mut unstructured).unwrap_or_default()
9813    }
9814}
9815impl Default for CONTROL_SYSTEM_STATE_DATA {
9816    fn default() -> Self {
9817        Self::DEFAULT.clone()
9818    }
9819}
9820impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9821    type Message = MavMessage;
9822    const ID: u32 = 146u32;
9823    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9824    const EXTRA_CRC: u8 = 103u8;
9825    const ENCODED_LEN: usize = 100usize;
9826    fn deser(
9827        _version: MavlinkVersion,
9828        __input: &[u8],
9829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9830        let avail_len = __input.len();
9831        let mut payload_buf = [0; Self::ENCODED_LEN];
9832        let mut buf = if avail_len < Self::ENCODED_LEN {
9833            payload_buf[0..avail_len].copy_from_slice(__input);
9834            Bytes::new(&payload_buf)
9835        } else {
9836            Bytes::new(__input)
9837        };
9838        let mut __struct = Self::default();
9839        __struct.time_usec = buf.get_u64_le();
9840        __struct.x_acc = buf.get_f32_le();
9841        __struct.y_acc = buf.get_f32_le();
9842        __struct.z_acc = buf.get_f32_le();
9843        __struct.x_vel = buf.get_f32_le();
9844        __struct.y_vel = buf.get_f32_le();
9845        __struct.z_vel = buf.get_f32_le();
9846        __struct.x_pos = buf.get_f32_le();
9847        __struct.y_pos = buf.get_f32_le();
9848        __struct.z_pos = buf.get_f32_le();
9849        __struct.airspeed = buf.get_f32_le();
9850        for v in &mut __struct.vel_variance {
9851            let val = buf.get_f32_le();
9852            *v = val;
9853        }
9854        for v in &mut __struct.pos_variance {
9855            let val = buf.get_f32_le();
9856            *v = val;
9857        }
9858        for v in &mut __struct.q {
9859            let val = buf.get_f32_le();
9860            *v = val;
9861        }
9862        __struct.roll_rate = buf.get_f32_le();
9863        __struct.pitch_rate = buf.get_f32_le();
9864        __struct.yaw_rate = buf.get_f32_le();
9865        Ok(__struct)
9866    }
9867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9868        let mut __tmp = BytesMut::new(bytes);
9869        #[allow(clippy::absurd_extreme_comparisons)]
9870        #[allow(unused_comparisons)]
9871        if __tmp.remaining() < Self::ENCODED_LEN {
9872            panic!(
9873                "buffer is too small (need {} bytes, but got {})",
9874                Self::ENCODED_LEN,
9875                __tmp.remaining(),
9876            )
9877        }
9878        __tmp.put_u64_le(self.time_usec);
9879        __tmp.put_f32_le(self.x_acc);
9880        __tmp.put_f32_le(self.y_acc);
9881        __tmp.put_f32_le(self.z_acc);
9882        __tmp.put_f32_le(self.x_vel);
9883        __tmp.put_f32_le(self.y_vel);
9884        __tmp.put_f32_le(self.z_vel);
9885        __tmp.put_f32_le(self.x_pos);
9886        __tmp.put_f32_le(self.y_pos);
9887        __tmp.put_f32_le(self.z_pos);
9888        __tmp.put_f32_le(self.airspeed);
9889        for val in &self.vel_variance {
9890            __tmp.put_f32_le(*val);
9891        }
9892        for val in &self.pos_variance {
9893            __tmp.put_f32_le(*val);
9894        }
9895        for val in &self.q {
9896            __tmp.put_f32_le(*val);
9897        }
9898        __tmp.put_f32_le(self.roll_rate);
9899        __tmp.put_f32_le(self.pitch_rate);
9900        __tmp.put_f32_le(self.yaw_rate);
9901        if matches!(version, MavlinkVersion::V2) {
9902            let len = __tmp.len();
9903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9904        } else {
9905            __tmp.len()
9906        }
9907    }
9908}
9909#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9910#[doc = ""]
9911#[doc = "ID: 411"]
9912#[derive(Debug, Clone, PartialEq)]
9913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9915#[cfg_attr(feature = "ts", derive(TS))]
9916#[cfg_attr(feature = "ts", ts(export))]
9917pub struct CURRENT_EVENT_SEQUENCE_DATA {
9918    #[doc = "Sequence number."]
9919    pub sequence: u16,
9920    #[doc = "Flag bitset."]
9921    pub flags: MavEventCurrentSequenceFlags,
9922}
9923impl CURRENT_EVENT_SEQUENCE_DATA {
9924    pub const ENCODED_LEN: usize = 3usize;
9925    pub const DEFAULT: Self = Self {
9926        sequence: 0_u16,
9927        flags: MavEventCurrentSequenceFlags::DEFAULT,
9928    };
9929    #[cfg(feature = "arbitrary")]
9930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9931        use arbitrary::{Arbitrary, Unstructured};
9932        let mut buf = [0u8; 1024];
9933        rng.fill_bytes(&mut buf);
9934        let mut unstructured = Unstructured::new(&buf);
9935        Self::arbitrary(&mut unstructured).unwrap_or_default()
9936    }
9937}
9938impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9939    fn default() -> Self {
9940        Self::DEFAULT.clone()
9941    }
9942}
9943impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9944    type Message = MavMessage;
9945    const ID: u32 = 411u32;
9946    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9947    const EXTRA_CRC: u8 = 106u8;
9948    const ENCODED_LEN: usize = 3usize;
9949    fn deser(
9950        _version: MavlinkVersion,
9951        __input: &[u8],
9952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9953        let avail_len = __input.len();
9954        let mut payload_buf = [0; Self::ENCODED_LEN];
9955        let mut buf = if avail_len < Self::ENCODED_LEN {
9956            payload_buf[0..avail_len].copy_from_slice(__input);
9957            Bytes::new(&payload_buf)
9958        } else {
9959            Bytes::new(__input)
9960        };
9961        let mut __struct = Self::default();
9962        __struct.sequence = buf.get_u16_le();
9963        let tmp = buf.get_u8();
9964        __struct.flags =
9965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9966                enum_type: "MavEventCurrentSequenceFlags",
9967                value: tmp as u32,
9968            })?;
9969        Ok(__struct)
9970    }
9971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9972        let mut __tmp = BytesMut::new(bytes);
9973        #[allow(clippy::absurd_extreme_comparisons)]
9974        #[allow(unused_comparisons)]
9975        if __tmp.remaining() < Self::ENCODED_LEN {
9976            panic!(
9977                "buffer is too small (need {} bytes, but got {})",
9978                Self::ENCODED_LEN,
9979                __tmp.remaining(),
9980            )
9981        }
9982        __tmp.put_u16_le(self.sequence);
9983        __tmp.put_u8(self.flags as u8);
9984        if matches!(version, MavlinkVersion::V2) {
9985            let len = __tmp.len();
9986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9987        } else {
9988            __tmp.len()
9989        }
9990    }
9991}
9992#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9993#[doc = ""]
9994#[doc = "ID: 436"]
9995#[derive(Debug, Clone, PartialEq)]
9996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9998#[cfg_attr(feature = "ts", derive(TS))]
9999#[cfg_attr(feature = "ts", ts(export))]
10000pub struct CURRENT_MODE_DATA {
10001    #[doc = "A bitfield for use for autopilot-specific flags"]
10002    pub custom_mode: u32,
10003    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10004    pub intended_custom_mode: u32,
10005    #[doc = "Standard mode."]
10006    pub standard_mode: MavStandardMode,
10007}
10008impl CURRENT_MODE_DATA {
10009    pub const ENCODED_LEN: usize = 9usize;
10010    pub const DEFAULT: Self = Self {
10011        custom_mode: 0_u32,
10012        intended_custom_mode: 0_u32,
10013        standard_mode: MavStandardMode::DEFAULT,
10014    };
10015    #[cfg(feature = "arbitrary")]
10016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10017        use arbitrary::{Arbitrary, Unstructured};
10018        let mut buf = [0u8; 1024];
10019        rng.fill_bytes(&mut buf);
10020        let mut unstructured = Unstructured::new(&buf);
10021        Self::arbitrary(&mut unstructured).unwrap_or_default()
10022    }
10023}
10024impl Default for CURRENT_MODE_DATA {
10025    fn default() -> Self {
10026        Self::DEFAULT.clone()
10027    }
10028}
10029impl MessageData for CURRENT_MODE_DATA {
10030    type Message = MavMessage;
10031    const ID: u32 = 436u32;
10032    const NAME: &'static str = "CURRENT_MODE";
10033    const EXTRA_CRC: u8 = 193u8;
10034    const ENCODED_LEN: usize = 9usize;
10035    fn deser(
10036        _version: MavlinkVersion,
10037        __input: &[u8],
10038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10039        let avail_len = __input.len();
10040        let mut payload_buf = [0; Self::ENCODED_LEN];
10041        let mut buf = if avail_len < Self::ENCODED_LEN {
10042            payload_buf[0..avail_len].copy_from_slice(__input);
10043            Bytes::new(&payload_buf)
10044        } else {
10045            Bytes::new(__input)
10046        };
10047        let mut __struct = Self::default();
10048        __struct.custom_mode = buf.get_u32_le();
10049        __struct.intended_custom_mode = buf.get_u32_le();
10050        let tmp = buf.get_u8();
10051        __struct.standard_mode =
10052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10053                enum_type: "MavStandardMode",
10054                value: tmp as u32,
10055            })?;
10056        Ok(__struct)
10057    }
10058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10059        let mut __tmp = BytesMut::new(bytes);
10060        #[allow(clippy::absurd_extreme_comparisons)]
10061        #[allow(unused_comparisons)]
10062        if __tmp.remaining() < Self::ENCODED_LEN {
10063            panic!(
10064                "buffer is too small (need {} bytes, but got {})",
10065                Self::ENCODED_LEN,
10066                __tmp.remaining(),
10067            )
10068        }
10069        __tmp.put_u32_le(self.custom_mode);
10070        __tmp.put_u32_le(self.intended_custom_mode);
10071        __tmp.put_u8(self.standard_mode as u8);
10072        if matches!(version, MavlinkVersion::V2) {
10073            let len = __tmp.len();
10074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10075        } else {
10076            __tmp.len()
10077        }
10078    }
10079}
10080#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10081#[doc = "Data stream status information."]
10082#[doc = ""]
10083#[doc = "ID: 67"]
10084#[derive(Debug, Clone, PartialEq)]
10085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10087#[cfg_attr(feature = "ts", derive(TS))]
10088#[cfg_attr(feature = "ts", ts(export))]
10089pub struct DATA_STREAM_DATA {
10090    #[doc = "The message rate"]
10091    pub message_rate: u16,
10092    #[doc = "The ID of the requested data stream"]
10093    pub stream_id: u8,
10094    #[doc = "1 stream is enabled, 0 stream is stopped."]
10095    pub on_off: u8,
10096}
10097impl DATA_STREAM_DATA {
10098    pub const ENCODED_LEN: usize = 4usize;
10099    pub const DEFAULT: Self = Self {
10100        message_rate: 0_u16,
10101        stream_id: 0_u8,
10102        on_off: 0_u8,
10103    };
10104    #[cfg(feature = "arbitrary")]
10105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10106        use arbitrary::{Arbitrary, Unstructured};
10107        let mut buf = [0u8; 1024];
10108        rng.fill_bytes(&mut buf);
10109        let mut unstructured = Unstructured::new(&buf);
10110        Self::arbitrary(&mut unstructured).unwrap_or_default()
10111    }
10112}
10113impl Default for DATA_STREAM_DATA {
10114    fn default() -> Self {
10115        Self::DEFAULT.clone()
10116    }
10117}
10118impl MessageData for DATA_STREAM_DATA {
10119    type Message = MavMessage;
10120    const ID: u32 = 67u32;
10121    const NAME: &'static str = "DATA_STREAM";
10122    const EXTRA_CRC: u8 = 21u8;
10123    const ENCODED_LEN: usize = 4usize;
10124    fn deser(
10125        _version: MavlinkVersion,
10126        __input: &[u8],
10127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10128        let avail_len = __input.len();
10129        let mut payload_buf = [0; Self::ENCODED_LEN];
10130        let mut buf = if avail_len < Self::ENCODED_LEN {
10131            payload_buf[0..avail_len].copy_from_slice(__input);
10132            Bytes::new(&payload_buf)
10133        } else {
10134            Bytes::new(__input)
10135        };
10136        let mut __struct = Self::default();
10137        __struct.message_rate = buf.get_u16_le();
10138        __struct.stream_id = buf.get_u8();
10139        __struct.on_off = buf.get_u8();
10140        Ok(__struct)
10141    }
10142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10143        let mut __tmp = BytesMut::new(bytes);
10144        #[allow(clippy::absurd_extreme_comparisons)]
10145        #[allow(unused_comparisons)]
10146        if __tmp.remaining() < Self::ENCODED_LEN {
10147            panic!(
10148                "buffer is too small (need {} bytes, but got {})",
10149                Self::ENCODED_LEN,
10150                __tmp.remaining(),
10151            )
10152        }
10153        __tmp.put_u16_le(self.message_rate);
10154        __tmp.put_u8(self.stream_id);
10155        __tmp.put_u8(self.on_off);
10156        if matches!(version, MavlinkVersion::V2) {
10157            let len = __tmp.len();
10158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10159        } else {
10160            __tmp.len()
10161        }
10162    }
10163}
10164#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10165#[doc = ""]
10166#[doc = "ID: 130"]
10167#[derive(Debug, Clone, PartialEq)]
10168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10170#[cfg_attr(feature = "ts", derive(TS))]
10171#[cfg_attr(feature = "ts", ts(export))]
10172pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10173    #[doc = "total data size (set on ACK only)."]
10174    pub size: u32,
10175    #[doc = "Width of a matrix or image."]
10176    pub width: u16,
10177    #[doc = "Height of a matrix or image."]
10178    pub height: u16,
10179    #[doc = "Number of packets being sent (set on ACK only)."]
10180    pub packets: u16,
10181    #[doc = "Type of requested/acknowledged data."]
10182    pub mavtype: MavlinkDataStreamType,
10183    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10184    pub payload: u8,
10185    #[doc = "JPEG quality. Values: [1-100]."]
10186    pub jpg_quality: u8,
10187}
10188impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10189    pub const ENCODED_LEN: usize = 13usize;
10190    pub const DEFAULT: Self = Self {
10191        size: 0_u32,
10192        width: 0_u16,
10193        height: 0_u16,
10194        packets: 0_u16,
10195        mavtype: MavlinkDataStreamType::DEFAULT,
10196        payload: 0_u8,
10197        jpg_quality: 0_u8,
10198    };
10199    #[cfg(feature = "arbitrary")]
10200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10201        use arbitrary::{Arbitrary, Unstructured};
10202        let mut buf = [0u8; 1024];
10203        rng.fill_bytes(&mut buf);
10204        let mut unstructured = Unstructured::new(&buf);
10205        Self::arbitrary(&mut unstructured).unwrap_or_default()
10206    }
10207}
10208impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10209    fn default() -> Self {
10210        Self::DEFAULT.clone()
10211    }
10212}
10213impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10214    type Message = MavMessage;
10215    const ID: u32 = 130u32;
10216    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10217    const EXTRA_CRC: u8 = 29u8;
10218    const ENCODED_LEN: usize = 13usize;
10219    fn deser(
10220        _version: MavlinkVersion,
10221        __input: &[u8],
10222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10223        let avail_len = __input.len();
10224        let mut payload_buf = [0; Self::ENCODED_LEN];
10225        let mut buf = if avail_len < Self::ENCODED_LEN {
10226            payload_buf[0..avail_len].copy_from_slice(__input);
10227            Bytes::new(&payload_buf)
10228        } else {
10229            Bytes::new(__input)
10230        };
10231        let mut __struct = Self::default();
10232        __struct.size = buf.get_u32_le();
10233        __struct.width = buf.get_u16_le();
10234        __struct.height = buf.get_u16_le();
10235        __struct.packets = buf.get_u16_le();
10236        let tmp = buf.get_u8();
10237        __struct.mavtype =
10238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10239                enum_type: "MavlinkDataStreamType",
10240                value: tmp as u32,
10241            })?;
10242        __struct.payload = buf.get_u8();
10243        __struct.jpg_quality = buf.get_u8();
10244        Ok(__struct)
10245    }
10246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10247        let mut __tmp = BytesMut::new(bytes);
10248        #[allow(clippy::absurd_extreme_comparisons)]
10249        #[allow(unused_comparisons)]
10250        if __tmp.remaining() < Self::ENCODED_LEN {
10251            panic!(
10252                "buffer is too small (need {} bytes, but got {})",
10253                Self::ENCODED_LEN,
10254                __tmp.remaining(),
10255            )
10256        }
10257        __tmp.put_u32_le(self.size);
10258        __tmp.put_u16_le(self.width);
10259        __tmp.put_u16_le(self.height);
10260        __tmp.put_u16_le(self.packets);
10261        __tmp.put_u8(self.mavtype as u8);
10262        __tmp.put_u8(self.payload);
10263        __tmp.put_u8(self.jpg_quality);
10264        if matches!(version, MavlinkVersion::V2) {
10265            let len = __tmp.len();
10266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10267        } else {
10268            __tmp.len()
10269        }
10270    }
10271}
10272#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10273#[doc = ""]
10274#[doc = "ID: 254"]
10275#[derive(Debug, Clone, PartialEq)]
10276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10278#[cfg_attr(feature = "ts", derive(TS))]
10279#[cfg_attr(feature = "ts", ts(export))]
10280pub struct DEBUG_DATA {
10281    #[doc = "Timestamp (time since system boot)."]
10282    pub time_boot_ms: u32,
10283    #[doc = "DEBUG value"]
10284    pub value: f32,
10285    #[doc = "index of debug variable"]
10286    pub ind: u8,
10287}
10288impl DEBUG_DATA {
10289    pub const ENCODED_LEN: usize = 9usize;
10290    pub const DEFAULT: Self = Self {
10291        time_boot_ms: 0_u32,
10292        value: 0.0_f32,
10293        ind: 0_u8,
10294    };
10295    #[cfg(feature = "arbitrary")]
10296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10297        use arbitrary::{Arbitrary, Unstructured};
10298        let mut buf = [0u8; 1024];
10299        rng.fill_bytes(&mut buf);
10300        let mut unstructured = Unstructured::new(&buf);
10301        Self::arbitrary(&mut unstructured).unwrap_or_default()
10302    }
10303}
10304impl Default for DEBUG_DATA {
10305    fn default() -> Self {
10306        Self::DEFAULT.clone()
10307    }
10308}
10309impl MessageData for DEBUG_DATA {
10310    type Message = MavMessage;
10311    const ID: u32 = 254u32;
10312    const NAME: &'static str = "DEBUG";
10313    const EXTRA_CRC: u8 = 46u8;
10314    const ENCODED_LEN: usize = 9usize;
10315    fn deser(
10316        _version: MavlinkVersion,
10317        __input: &[u8],
10318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10319        let avail_len = __input.len();
10320        let mut payload_buf = [0; Self::ENCODED_LEN];
10321        let mut buf = if avail_len < Self::ENCODED_LEN {
10322            payload_buf[0..avail_len].copy_from_slice(__input);
10323            Bytes::new(&payload_buf)
10324        } else {
10325            Bytes::new(__input)
10326        };
10327        let mut __struct = Self::default();
10328        __struct.time_boot_ms = buf.get_u32_le();
10329        __struct.value = buf.get_f32_le();
10330        __struct.ind = buf.get_u8();
10331        Ok(__struct)
10332    }
10333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10334        let mut __tmp = BytesMut::new(bytes);
10335        #[allow(clippy::absurd_extreme_comparisons)]
10336        #[allow(unused_comparisons)]
10337        if __tmp.remaining() < Self::ENCODED_LEN {
10338            panic!(
10339                "buffer is too small (need {} bytes, but got {})",
10340                Self::ENCODED_LEN,
10341                __tmp.remaining(),
10342            )
10343        }
10344        __tmp.put_u32_le(self.time_boot_ms);
10345        __tmp.put_f32_le(self.value);
10346        __tmp.put_u8(self.ind);
10347        if matches!(version, MavlinkVersion::V2) {
10348            let len = __tmp.len();
10349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10350        } else {
10351            __tmp.len()
10352        }
10353    }
10354}
10355#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10356#[doc = ""]
10357#[doc = "ID: 350"]
10358#[derive(Debug, Clone, PartialEq)]
10359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10361#[cfg_attr(feature = "ts", derive(TS))]
10362#[cfg_attr(feature = "ts", ts(export))]
10363pub struct DEBUG_FLOAT_ARRAY_DATA {
10364    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10365    pub time_usec: u64,
10366    #[doc = "Unique ID used to discriminate between arrays"]
10367    pub array_id: u16,
10368    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10369    #[cfg_attr(feature = "ts", ts(type = "string"))]
10370    pub name: CharArray<10>,
10371    #[doc = "data"]
10372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10375    pub data: [f32; 58],
10376}
10377impl DEBUG_FLOAT_ARRAY_DATA {
10378    pub const ENCODED_LEN: usize = 252usize;
10379    pub const DEFAULT: Self = Self {
10380        time_usec: 0_u64,
10381        array_id: 0_u16,
10382        name: CharArray::new([0_u8; 10usize]),
10383        data: [0.0_f32; 58usize],
10384    };
10385    #[cfg(feature = "arbitrary")]
10386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10387        use arbitrary::{Arbitrary, Unstructured};
10388        let mut buf = [0u8; 1024];
10389        rng.fill_bytes(&mut buf);
10390        let mut unstructured = Unstructured::new(&buf);
10391        Self::arbitrary(&mut unstructured).unwrap_or_default()
10392    }
10393}
10394impl Default for DEBUG_FLOAT_ARRAY_DATA {
10395    fn default() -> Self {
10396        Self::DEFAULT.clone()
10397    }
10398}
10399impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10400    type Message = MavMessage;
10401    const ID: u32 = 350u32;
10402    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10403    const EXTRA_CRC: u8 = 232u8;
10404    const ENCODED_LEN: usize = 252usize;
10405    fn deser(
10406        _version: MavlinkVersion,
10407        __input: &[u8],
10408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10409        let avail_len = __input.len();
10410        let mut payload_buf = [0; Self::ENCODED_LEN];
10411        let mut buf = if avail_len < Self::ENCODED_LEN {
10412            payload_buf[0..avail_len].copy_from_slice(__input);
10413            Bytes::new(&payload_buf)
10414        } else {
10415            Bytes::new(__input)
10416        };
10417        let mut __struct = Self::default();
10418        __struct.time_usec = buf.get_u64_le();
10419        __struct.array_id = buf.get_u16_le();
10420        let mut tmp = [0_u8; 10usize];
10421        for v in &mut tmp {
10422            *v = buf.get_u8();
10423        }
10424        __struct.name = CharArray::new(tmp);
10425        for v in &mut __struct.data {
10426            let val = buf.get_f32_le();
10427            *v = val;
10428        }
10429        Ok(__struct)
10430    }
10431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10432        let mut __tmp = BytesMut::new(bytes);
10433        #[allow(clippy::absurd_extreme_comparisons)]
10434        #[allow(unused_comparisons)]
10435        if __tmp.remaining() < Self::ENCODED_LEN {
10436            panic!(
10437                "buffer is too small (need {} bytes, but got {})",
10438                Self::ENCODED_LEN,
10439                __tmp.remaining(),
10440            )
10441        }
10442        __tmp.put_u64_le(self.time_usec);
10443        __tmp.put_u16_le(self.array_id);
10444        for val in &self.name {
10445            __tmp.put_u8(*val);
10446        }
10447        if matches!(version, MavlinkVersion::V2) {
10448            for val in &self.data {
10449                __tmp.put_f32_le(*val);
10450            }
10451            let len = __tmp.len();
10452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10453        } else {
10454            __tmp.len()
10455        }
10456    }
10457}
10458#[doc = "To debug something using a named 3D vector."]
10459#[doc = ""]
10460#[doc = "ID: 250"]
10461#[derive(Debug, Clone, PartialEq)]
10462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10464#[cfg_attr(feature = "ts", derive(TS))]
10465#[cfg_attr(feature = "ts", ts(export))]
10466pub struct DEBUG_VECT_DATA {
10467    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10468    pub time_usec: u64,
10469    #[doc = "x"]
10470    pub x: f32,
10471    #[doc = "y"]
10472    pub y: f32,
10473    #[doc = "z"]
10474    pub z: f32,
10475    #[doc = "Name"]
10476    #[cfg_attr(feature = "ts", ts(type = "string"))]
10477    pub name: CharArray<10>,
10478}
10479impl DEBUG_VECT_DATA {
10480    pub const ENCODED_LEN: usize = 30usize;
10481    pub const DEFAULT: Self = Self {
10482        time_usec: 0_u64,
10483        x: 0.0_f32,
10484        y: 0.0_f32,
10485        z: 0.0_f32,
10486        name: CharArray::new([0_u8; 10usize]),
10487    };
10488    #[cfg(feature = "arbitrary")]
10489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10490        use arbitrary::{Arbitrary, Unstructured};
10491        let mut buf = [0u8; 1024];
10492        rng.fill_bytes(&mut buf);
10493        let mut unstructured = Unstructured::new(&buf);
10494        Self::arbitrary(&mut unstructured).unwrap_or_default()
10495    }
10496}
10497impl Default for DEBUG_VECT_DATA {
10498    fn default() -> Self {
10499        Self::DEFAULT.clone()
10500    }
10501}
10502impl MessageData for DEBUG_VECT_DATA {
10503    type Message = MavMessage;
10504    const ID: u32 = 250u32;
10505    const NAME: &'static str = "DEBUG_VECT";
10506    const EXTRA_CRC: u8 = 49u8;
10507    const ENCODED_LEN: usize = 30usize;
10508    fn deser(
10509        _version: MavlinkVersion,
10510        __input: &[u8],
10511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10512        let avail_len = __input.len();
10513        let mut payload_buf = [0; Self::ENCODED_LEN];
10514        let mut buf = if avail_len < Self::ENCODED_LEN {
10515            payload_buf[0..avail_len].copy_from_slice(__input);
10516            Bytes::new(&payload_buf)
10517        } else {
10518            Bytes::new(__input)
10519        };
10520        let mut __struct = Self::default();
10521        __struct.time_usec = buf.get_u64_le();
10522        __struct.x = buf.get_f32_le();
10523        __struct.y = buf.get_f32_le();
10524        __struct.z = buf.get_f32_le();
10525        let mut tmp = [0_u8; 10usize];
10526        for v in &mut tmp {
10527            *v = buf.get_u8();
10528        }
10529        __struct.name = CharArray::new(tmp);
10530        Ok(__struct)
10531    }
10532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10533        let mut __tmp = BytesMut::new(bytes);
10534        #[allow(clippy::absurd_extreme_comparisons)]
10535        #[allow(unused_comparisons)]
10536        if __tmp.remaining() < Self::ENCODED_LEN {
10537            panic!(
10538                "buffer is too small (need {} bytes, but got {})",
10539                Self::ENCODED_LEN,
10540                __tmp.remaining(),
10541            )
10542        }
10543        __tmp.put_u64_le(self.time_usec);
10544        __tmp.put_f32_le(self.x);
10545        __tmp.put_f32_le(self.y);
10546        __tmp.put_f32_le(self.z);
10547        for val in &self.name {
10548            __tmp.put_u8(*val);
10549        }
10550        if matches!(version, MavlinkVersion::V2) {
10551            let len = __tmp.len();
10552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10553        } else {
10554            __tmp.len()
10555        }
10556    }
10557}
10558#[doc = "Distance sensor information for an onboard rangefinder."]
10559#[doc = ""]
10560#[doc = "ID: 132"]
10561#[derive(Debug, Clone, PartialEq)]
10562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10564#[cfg_attr(feature = "ts", derive(TS))]
10565#[cfg_attr(feature = "ts", ts(export))]
10566pub struct DISTANCE_SENSOR_DATA {
10567    #[doc = "Timestamp (time since system boot)."]
10568    pub time_boot_ms: u32,
10569    #[doc = "Minimum distance the sensor can measure"]
10570    pub min_distance: u16,
10571    #[doc = "Maximum distance the sensor can measure"]
10572    pub max_distance: u16,
10573    #[doc = "Current distance reading"]
10574    pub current_distance: u16,
10575    #[doc = "Type of distance sensor."]
10576    pub mavtype: MavDistanceSensor,
10577    #[doc = "Onboard ID of the sensor"]
10578    pub id: u8,
10579    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10580    pub orientation: MavSensorOrientation,
10581    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10582    pub covariance: u8,
10583    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10585    pub horizontal_fov: f32,
10586    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10588    pub vertical_fov: f32,
10589    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10592    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10593    pub quaternion: [f32; 4],
10594    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10596    pub signal_quality: u8,
10597}
10598impl DISTANCE_SENSOR_DATA {
10599    pub const ENCODED_LEN: usize = 39usize;
10600    pub const DEFAULT: Self = Self {
10601        time_boot_ms: 0_u32,
10602        min_distance: 0_u16,
10603        max_distance: 0_u16,
10604        current_distance: 0_u16,
10605        mavtype: MavDistanceSensor::DEFAULT,
10606        id: 0_u8,
10607        orientation: MavSensorOrientation::DEFAULT,
10608        covariance: 0_u8,
10609        horizontal_fov: 0.0_f32,
10610        vertical_fov: 0.0_f32,
10611        quaternion: [0.0_f32; 4usize],
10612        signal_quality: 0_u8,
10613    };
10614    #[cfg(feature = "arbitrary")]
10615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10616        use arbitrary::{Arbitrary, Unstructured};
10617        let mut buf = [0u8; 1024];
10618        rng.fill_bytes(&mut buf);
10619        let mut unstructured = Unstructured::new(&buf);
10620        Self::arbitrary(&mut unstructured).unwrap_or_default()
10621    }
10622}
10623impl Default for DISTANCE_SENSOR_DATA {
10624    fn default() -> Self {
10625        Self::DEFAULT.clone()
10626    }
10627}
10628impl MessageData for DISTANCE_SENSOR_DATA {
10629    type Message = MavMessage;
10630    const ID: u32 = 132u32;
10631    const NAME: &'static str = "DISTANCE_SENSOR";
10632    const EXTRA_CRC: u8 = 85u8;
10633    const ENCODED_LEN: usize = 39usize;
10634    fn deser(
10635        _version: MavlinkVersion,
10636        __input: &[u8],
10637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10638        let avail_len = __input.len();
10639        let mut payload_buf = [0; Self::ENCODED_LEN];
10640        let mut buf = if avail_len < Self::ENCODED_LEN {
10641            payload_buf[0..avail_len].copy_from_slice(__input);
10642            Bytes::new(&payload_buf)
10643        } else {
10644            Bytes::new(__input)
10645        };
10646        let mut __struct = Self::default();
10647        __struct.time_boot_ms = buf.get_u32_le();
10648        __struct.min_distance = buf.get_u16_le();
10649        __struct.max_distance = buf.get_u16_le();
10650        __struct.current_distance = buf.get_u16_le();
10651        let tmp = buf.get_u8();
10652        __struct.mavtype =
10653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10654                enum_type: "MavDistanceSensor",
10655                value: tmp as u32,
10656            })?;
10657        __struct.id = buf.get_u8();
10658        let tmp = buf.get_u8();
10659        __struct.orientation =
10660            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10661                enum_type: "MavSensorOrientation",
10662                value: tmp as u32,
10663            })?;
10664        __struct.covariance = buf.get_u8();
10665        __struct.horizontal_fov = buf.get_f32_le();
10666        __struct.vertical_fov = buf.get_f32_le();
10667        for v in &mut __struct.quaternion {
10668            let val = buf.get_f32_le();
10669            *v = val;
10670        }
10671        __struct.signal_quality = buf.get_u8();
10672        Ok(__struct)
10673    }
10674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10675        let mut __tmp = BytesMut::new(bytes);
10676        #[allow(clippy::absurd_extreme_comparisons)]
10677        #[allow(unused_comparisons)]
10678        if __tmp.remaining() < Self::ENCODED_LEN {
10679            panic!(
10680                "buffer is too small (need {} bytes, but got {})",
10681                Self::ENCODED_LEN,
10682                __tmp.remaining(),
10683            )
10684        }
10685        __tmp.put_u32_le(self.time_boot_ms);
10686        __tmp.put_u16_le(self.min_distance);
10687        __tmp.put_u16_le(self.max_distance);
10688        __tmp.put_u16_le(self.current_distance);
10689        __tmp.put_u8(self.mavtype as u8);
10690        __tmp.put_u8(self.id);
10691        __tmp.put_u8(self.orientation as u8);
10692        __tmp.put_u8(self.covariance);
10693        if matches!(version, MavlinkVersion::V2) {
10694            __tmp.put_f32_le(self.horizontal_fov);
10695            __tmp.put_f32_le(self.vertical_fov);
10696            for val in &self.quaternion {
10697                __tmp.put_f32_le(*val);
10698            }
10699            __tmp.put_u8(self.signal_quality);
10700            let len = __tmp.len();
10701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10702        } else {
10703            __tmp.len()
10704        }
10705    }
10706}
10707#[doc = "EFI status output."]
10708#[doc = ""]
10709#[doc = "ID: 225"]
10710#[derive(Debug, Clone, PartialEq)]
10711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10713#[cfg_attr(feature = "ts", derive(TS))]
10714#[cfg_attr(feature = "ts", ts(export))]
10715pub struct EFI_STATUS_DATA {
10716    #[doc = "ECU index"]
10717    pub ecu_index: f32,
10718    #[doc = "RPM"]
10719    pub rpm: f32,
10720    #[doc = "Fuel consumed"]
10721    pub fuel_consumed: f32,
10722    #[doc = "Fuel flow rate"]
10723    pub fuel_flow: f32,
10724    #[doc = "Engine load"]
10725    pub engine_load: f32,
10726    #[doc = "Throttle position"]
10727    pub throttle_position: f32,
10728    #[doc = "Spark dwell time"]
10729    pub spark_dwell_time: f32,
10730    #[doc = "Barometric pressure"]
10731    pub barometric_pressure: f32,
10732    #[doc = "Intake manifold pressure("]
10733    pub intake_manifold_pressure: f32,
10734    #[doc = "Intake manifold temperature"]
10735    pub intake_manifold_temperature: f32,
10736    #[doc = "Cylinder head temperature"]
10737    pub cylinder_head_temperature: f32,
10738    #[doc = "Ignition timing (Crank angle degrees)"]
10739    pub ignition_timing: f32,
10740    #[doc = "Injection time"]
10741    pub injection_time: f32,
10742    #[doc = "Exhaust gas temperature"]
10743    pub exhaust_gas_temperature: f32,
10744    #[doc = "Output throttle"]
10745    pub throttle_out: f32,
10746    #[doc = "Pressure/temperature compensation"]
10747    pub pt_compensation: f32,
10748    #[doc = "EFI health status"]
10749    pub health: u8,
10750    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10752    pub ignition_voltage: f32,
10753    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10755    pub fuel_pressure: f32,
10756}
10757impl EFI_STATUS_DATA {
10758    pub const ENCODED_LEN: usize = 73usize;
10759    pub const DEFAULT: Self = Self {
10760        ecu_index: 0.0_f32,
10761        rpm: 0.0_f32,
10762        fuel_consumed: 0.0_f32,
10763        fuel_flow: 0.0_f32,
10764        engine_load: 0.0_f32,
10765        throttle_position: 0.0_f32,
10766        spark_dwell_time: 0.0_f32,
10767        barometric_pressure: 0.0_f32,
10768        intake_manifold_pressure: 0.0_f32,
10769        intake_manifold_temperature: 0.0_f32,
10770        cylinder_head_temperature: 0.0_f32,
10771        ignition_timing: 0.0_f32,
10772        injection_time: 0.0_f32,
10773        exhaust_gas_temperature: 0.0_f32,
10774        throttle_out: 0.0_f32,
10775        pt_compensation: 0.0_f32,
10776        health: 0_u8,
10777        ignition_voltage: 0.0_f32,
10778        fuel_pressure: 0.0_f32,
10779    };
10780    #[cfg(feature = "arbitrary")]
10781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10782        use arbitrary::{Arbitrary, Unstructured};
10783        let mut buf = [0u8; 1024];
10784        rng.fill_bytes(&mut buf);
10785        let mut unstructured = Unstructured::new(&buf);
10786        Self::arbitrary(&mut unstructured).unwrap_or_default()
10787    }
10788}
10789impl Default for EFI_STATUS_DATA {
10790    fn default() -> Self {
10791        Self::DEFAULT.clone()
10792    }
10793}
10794impl MessageData for EFI_STATUS_DATA {
10795    type Message = MavMessage;
10796    const ID: u32 = 225u32;
10797    const NAME: &'static str = "EFI_STATUS";
10798    const EXTRA_CRC: u8 = 208u8;
10799    const ENCODED_LEN: usize = 73usize;
10800    fn deser(
10801        _version: MavlinkVersion,
10802        __input: &[u8],
10803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10804        let avail_len = __input.len();
10805        let mut payload_buf = [0; Self::ENCODED_LEN];
10806        let mut buf = if avail_len < Self::ENCODED_LEN {
10807            payload_buf[0..avail_len].copy_from_slice(__input);
10808            Bytes::new(&payload_buf)
10809        } else {
10810            Bytes::new(__input)
10811        };
10812        let mut __struct = Self::default();
10813        __struct.ecu_index = buf.get_f32_le();
10814        __struct.rpm = buf.get_f32_le();
10815        __struct.fuel_consumed = buf.get_f32_le();
10816        __struct.fuel_flow = buf.get_f32_le();
10817        __struct.engine_load = buf.get_f32_le();
10818        __struct.throttle_position = buf.get_f32_le();
10819        __struct.spark_dwell_time = buf.get_f32_le();
10820        __struct.barometric_pressure = buf.get_f32_le();
10821        __struct.intake_manifold_pressure = buf.get_f32_le();
10822        __struct.intake_manifold_temperature = buf.get_f32_le();
10823        __struct.cylinder_head_temperature = buf.get_f32_le();
10824        __struct.ignition_timing = buf.get_f32_le();
10825        __struct.injection_time = buf.get_f32_le();
10826        __struct.exhaust_gas_temperature = buf.get_f32_le();
10827        __struct.throttle_out = buf.get_f32_le();
10828        __struct.pt_compensation = buf.get_f32_le();
10829        __struct.health = buf.get_u8();
10830        __struct.ignition_voltage = buf.get_f32_le();
10831        __struct.fuel_pressure = buf.get_f32_le();
10832        Ok(__struct)
10833    }
10834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10835        let mut __tmp = BytesMut::new(bytes);
10836        #[allow(clippy::absurd_extreme_comparisons)]
10837        #[allow(unused_comparisons)]
10838        if __tmp.remaining() < Self::ENCODED_LEN {
10839            panic!(
10840                "buffer is too small (need {} bytes, but got {})",
10841                Self::ENCODED_LEN,
10842                __tmp.remaining(),
10843            )
10844        }
10845        __tmp.put_f32_le(self.ecu_index);
10846        __tmp.put_f32_le(self.rpm);
10847        __tmp.put_f32_le(self.fuel_consumed);
10848        __tmp.put_f32_le(self.fuel_flow);
10849        __tmp.put_f32_le(self.engine_load);
10850        __tmp.put_f32_le(self.throttle_position);
10851        __tmp.put_f32_le(self.spark_dwell_time);
10852        __tmp.put_f32_le(self.barometric_pressure);
10853        __tmp.put_f32_le(self.intake_manifold_pressure);
10854        __tmp.put_f32_le(self.intake_manifold_temperature);
10855        __tmp.put_f32_le(self.cylinder_head_temperature);
10856        __tmp.put_f32_le(self.ignition_timing);
10857        __tmp.put_f32_le(self.injection_time);
10858        __tmp.put_f32_le(self.exhaust_gas_temperature);
10859        __tmp.put_f32_le(self.throttle_out);
10860        __tmp.put_f32_le(self.pt_compensation);
10861        __tmp.put_u8(self.health);
10862        if matches!(version, MavlinkVersion::V2) {
10863            __tmp.put_f32_le(self.ignition_voltage);
10864            __tmp.put_f32_le(self.fuel_pressure);
10865            let len = __tmp.len();
10866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10867        } else {
10868            __tmp.len()
10869        }
10870    }
10871}
10872#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10873#[doc = ""]
10874#[doc = "ID: 131"]
10875#[derive(Debug, Clone, PartialEq)]
10876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10878#[cfg_attr(feature = "ts", derive(TS))]
10879#[cfg_attr(feature = "ts", ts(export))]
10880pub struct ENCAPSULATED_DATA_DATA {
10881    #[doc = "sequence number (starting with 0 on every transmission)"]
10882    pub seqnr: u16,
10883    #[doc = "image data bytes"]
10884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10885    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10886    pub data: [u8; 253],
10887}
10888impl ENCAPSULATED_DATA_DATA {
10889    pub const ENCODED_LEN: usize = 255usize;
10890    pub const DEFAULT: Self = Self {
10891        seqnr: 0_u16,
10892        data: [0_u8; 253usize],
10893    };
10894    #[cfg(feature = "arbitrary")]
10895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10896        use arbitrary::{Arbitrary, Unstructured};
10897        let mut buf = [0u8; 1024];
10898        rng.fill_bytes(&mut buf);
10899        let mut unstructured = Unstructured::new(&buf);
10900        Self::arbitrary(&mut unstructured).unwrap_or_default()
10901    }
10902}
10903impl Default for ENCAPSULATED_DATA_DATA {
10904    fn default() -> Self {
10905        Self::DEFAULT.clone()
10906    }
10907}
10908impl MessageData for ENCAPSULATED_DATA_DATA {
10909    type Message = MavMessage;
10910    const ID: u32 = 131u32;
10911    const NAME: &'static str = "ENCAPSULATED_DATA";
10912    const EXTRA_CRC: u8 = 223u8;
10913    const ENCODED_LEN: usize = 255usize;
10914    fn deser(
10915        _version: MavlinkVersion,
10916        __input: &[u8],
10917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10918        let avail_len = __input.len();
10919        let mut payload_buf = [0; Self::ENCODED_LEN];
10920        let mut buf = if avail_len < Self::ENCODED_LEN {
10921            payload_buf[0..avail_len].copy_from_slice(__input);
10922            Bytes::new(&payload_buf)
10923        } else {
10924            Bytes::new(__input)
10925        };
10926        let mut __struct = Self::default();
10927        __struct.seqnr = buf.get_u16_le();
10928        for v in &mut __struct.data {
10929            let val = buf.get_u8();
10930            *v = val;
10931        }
10932        Ok(__struct)
10933    }
10934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10935        let mut __tmp = BytesMut::new(bytes);
10936        #[allow(clippy::absurd_extreme_comparisons)]
10937        #[allow(unused_comparisons)]
10938        if __tmp.remaining() < Self::ENCODED_LEN {
10939            panic!(
10940                "buffer is too small (need {} bytes, but got {})",
10941                Self::ENCODED_LEN,
10942                __tmp.remaining(),
10943            )
10944        }
10945        __tmp.put_u16_le(self.seqnr);
10946        for val in &self.data {
10947            __tmp.put_u8(*val);
10948        }
10949        if matches!(version, MavlinkVersion::V2) {
10950            let len = __tmp.len();
10951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10952        } else {
10953            __tmp.len()
10954        }
10955    }
10956}
10957#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10958#[doc = ""]
10959#[doc = "ID: 290"]
10960#[derive(Debug, Clone, PartialEq)]
10961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10963#[cfg_attr(feature = "ts", derive(TS))]
10964#[cfg_attr(feature = "ts", ts(export))]
10965pub struct ESC_INFO_DATA {
10966    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10967    pub time_usec: u64,
10968    #[doc = "Number of reported errors by each ESC since boot."]
10969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10970    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10971    pub error_count: [u32; 4],
10972    #[doc = "Counter of data packets received."]
10973    pub counter: u16,
10974    #[doc = "Bitmap of ESC failure flags."]
10975    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10976    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10977    pub failure_flags: [u16; 4],
10978    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10981    pub temperature: [i16; 4],
10982    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10983    pub index: u8,
10984    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10985    pub count: u8,
10986    #[doc = "Connection type protocol for all ESC."]
10987    pub connection_type: EscConnectionType,
10988    #[doc = "Information regarding online/offline status of each ESC."]
10989    pub info: u8,
10990}
10991impl ESC_INFO_DATA {
10992    pub const ENCODED_LEN: usize = 46usize;
10993    pub const DEFAULT: Self = Self {
10994        time_usec: 0_u64,
10995        error_count: [0_u32; 4usize],
10996        counter: 0_u16,
10997        failure_flags: [0_u16; 4usize],
10998        temperature: [0_i16; 4usize],
10999        index: 0_u8,
11000        count: 0_u8,
11001        connection_type: EscConnectionType::DEFAULT,
11002        info: 0_u8,
11003    };
11004    #[cfg(feature = "arbitrary")]
11005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11006        use arbitrary::{Arbitrary, Unstructured};
11007        let mut buf = [0u8; 1024];
11008        rng.fill_bytes(&mut buf);
11009        let mut unstructured = Unstructured::new(&buf);
11010        Self::arbitrary(&mut unstructured).unwrap_or_default()
11011    }
11012}
11013impl Default for ESC_INFO_DATA {
11014    fn default() -> Self {
11015        Self::DEFAULT.clone()
11016    }
11017}
11018impl MessageData for ESC_INFO_DATA {
11019    type Message = MavMessage;
11020    const ID: u32 = 290u32;
11021    const NAME: &'static str = "ESC_INFO";
11022    const EXTRA_CRC: u8 = 251u8;
11023    const ENCODED_LEN: usize = 46usize;
11024    fn deser(
11025        _version: MavlinkVersion,
11026        __input: &[u8],
11027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11028        let avail_len = __input.len();
11029        let mut payload_buf = [0; Self::ENCODED_LEN];
11030        let mut buf = if avail_len < Self::ENCODED_LEN {
11031            payload_buf[0..avail_len].copy_from_slice(__input);
11032            Bytes::new(&payload_buf)
11033        } else {
11034            Bytes::new(__input)
11035        };
11036        let mut __struct = Self::default();
11037        __struct.time_usec = buf.get_u64_le();
11038        for v in &mut __struct.error_count {
11039            let val = buf.get_u32_le();
11040            *v = val;
11041        }
11042        __struct.counter = buf.get_u16_le();
11043        for v in &mut __struct.failure_flags {
11044            let val = buf.get_u16_le();
11045            *v = val;
11046        }
11047        for v in &mut __struct.temperature {
11048            let val = buf.get_i16_le();
11049            *v = val;
11050        }
11051        __struct.index = buf.get_u8();
11052        __struct.count = buf.get_u8();
11053        let tmp = buf.get_u8();
11054        __struct.connection_type =
11055            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11056                enum_type: "EscConnectionType",
11057                value: tmp as u32,
11058            })?;
11059        __struct.info = buf.get_u8();
11060        Ok(__struct)
11061    }
11062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11063        let mut __tmp = BytesMut::new(bytes);
11064        #[allow(clippy::absurd_extreme_comparisons)]
11065        #[allow(unused_comparisons)]
11066        if __tmp.remaining() < Self::ENCODED_LEN {
11067            panic!(
11068                "buffer is too small (need {} bytes, but got {})",
11069                Self::ENCODED_LEN,
11070                __tmp.remaining(),
11071            )
11072        }
11073        __tmp.put_u64_le(self.time_usec);
11074        for val in &self.error_count {
11075            __tmp.put_u32_le(*val);
11076        }
11077        __tmp.put_u16_le(self.counter);
11078        for val in &self.failure_flags {
11079            __tmp.put_u16_le(*val);
11080        }
11081        for val in &self.temperature {
11082            __tmp.put_i16_le(*val);
11083        }
11084        __tmp.put_u8(self.index);
11085        __tmp.put_u8(self.count);
11086        __tmp.put_u8(self.connection_type as u8);
11087        __tmp.put_u8(self.info);
11088        if matches!(version, MavlinkVersion::V2) {
11089            let len = __tmp.len();
11090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11091        } else {
11092            __tmp.len()
11093        }
11094    }
11095}
11096#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11097#[doc = ""]
11098#[doc = "ID: 291"]
11099#[derive(Debug, Clone, PartialEq)]
11100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11102#[cfg_attr(feature = "ts", derive(TS))]
11103#[cfg_attr(feature = "ts", ts(export))]
11104pub struct ESC_STATUS_DATA {
11105    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11106    pub time_usec: u64,
11107    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11108    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11109    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11110    pub rpm: [i32; 4],
11111    #[doc = "Voltage measured from each ESC."]
11112    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11113    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11114    pub voltage: [f32; 4],
11115    #[doc = "Current measured from each ESC."]
11116    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11117    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11118    pub current: [f32; 4],
11119    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11120    pub index: u8,
11121}
11122impl ESC_STATUS_DATA {
11123    pub const ENCODED_LEN: usize = 57usize;
11124    pub const DEFAULT: Self = Self {
11125        time_usec: 0_u64,
11126        rpm: [0_i32; 4usize],
11127        voltage: [0.0_f32; 4usize],
11128        current: [0.0_f32; 4usize],
11129        index: 0_u8,
11130    };
11131    #[cfg(feature = "arbitrary")]
11132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11133        use arbitrary::{Arbitrary, Unstructured};
11134        let mut buf = [0u8; 1024];
11135        rng.fill_bytes(&mut buf);
11136        let mut unstructured = Unstructured::new(&buf);
11137        Self::arbitrary(&mut unstructured).unwrap_or_default()
11138    }
11139}
11140impl Default for ESC_STATUS_DATA {
11141    fn default() -> Self {
11142        Self::DEFAULT.clone()
11143    }
11144}
11145impl MessageData for ESC_STATUS_DATA {
11146    type Message = MavMessage;
11147    const ID: u32 = 291u32;
11148    const NAME: &'static str = "ESC_STATUS";
11149    const EXTRA_CRC: u8 = 10u8;
11150    const ENCODED_LEN: usize = 57usize;
11151    fn deser(
11152        _version: MavlinkVersion,
11153        __input: &[u8],
11154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11155        let avail_len = __input.len();
11156        let mut payload_buf = [0; Self::ENCODED_LEN];
11157        let mut buf = if avail_len < Self::ENCODED_LEN {
11158            payload_buf[0..avail_len].copy_from_slice(__input);
11159            Bytes::new(&payload_buf)
11160        } else {
11161            Bytes::new(__input)
11162        };
11163        let mut __struct = Self::default();
11164        __struct.time_usec = buf.get_u64_le();
11165        for v in &mut __struct.rpm {
11166            let val = buf.get_i32_le();
11167            *v = val;
11168        }
11169        for v in &mut __struct.voltage {
11170            let val = buf.get_f32_le();
11171            *v = val;
11172        }
11173        for v in &mut __struct.current {
11174            let val = buf.get_f32_le();
11175            *v = val;
11176        }
11177        __struct.index = buf.get_u8();
11178        Ok(__struct)
11179    }
11180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11181        let mut __tmp = BytesMut::new(bytes);
11182        #[allow(clippy::absurd_extreme_comparisons)]
11183        #[allow(unused_comparisons)]
11184        if __tmp.remaining() < Self::ENCODED_LEN {
11185            panic!(
11186                "buffer is too small (need {} bytes, but got {})",
11187                Self::ENCODED_LEN,
11188                __tmp.remaining(),
11189            )
11190        }
11191        __tmp.put_u64_le(self.time_usec);
11192        for val in &self.rpm {
11193            __tmp.put_i32_le(*val);
11194        }
11195        for val in &self.voltage {
11196            __tmp.put_f32_le(*val);
11197        }
11198        for val in &self.current {
11199            __tmp.put_f32_le(*val);
11200        }
11201        __tmp.put_u8(self.index);
11202        if matches!(version, MavlinkVersion::V2) {
11203            let len = __tmp.len();
11204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11205        } else {
11206            __tmp.len()
11207        }
11208    }
11209}
11210#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11211#[doc = ""]
11212#[doc = "ID: 230"]
11213#[derive(Debug, Clone, PartialEq)]
11214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11216#[cfg_attr(feature = "ts", derive(TS))]
11217#[cfg_attr(feature = "ts", ts(export))]
11218pub struct ESTIMATOR_STATUS_DATA {
11219    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11220    pub time_usec: u64,
11221    #[doc = "Velocity innovation test ratio"]
11222    pub vel_ratio: f32,
11223    #[doc = "Horizontal position innovation test ratio"]
11224    pub pos_horiz_ratio: f32,
11225    #[doc = "Vertical position innovation test ratio"]
11226    pub pos_vert_ratio: f32,
11227    #[doc = "Magnetometer innovation test ratio"]
11228    pub mag_ratio: f32,
11229    #[doc = "Height above terrain innovation test ratio"]
11230    pub hagl_ratio: f32,
11231    #[doc = "True airspeed innovation test ratio"]
11232    pub tas_ratio: f32,
11233    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11234    pub pos_horiz_accuracy: f32,
11235    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11236    pub pos_vert_accuracy: f32,
11237    #[doc = "Bitmap indicating which EKF outputs are valid."]
11238    pub flags: EstimatorStatusFlags,
11239}
11240impl ESTIMATOR_STATUS_DATA {
11241    pub const ENCODED_LEN: usize = 42usize;
11242    pub const DEFAULT: Self = Self {
11243        time_usec: 0_u64,
11244        vel_ratio: 0.0_f32,
11245        pos_horiz_ratio: 0.0_f32,
11246        pos_vert_ratio: 0.0_f32,
11247        mag_ratio: 0.0_f32,
11248        hagl_ratio: 0.0_f32,
11249        tas_ratio: 0.0_f32,
11250        pos_horiz_accuracy: 0.0_f32,
11251        pos_vert_accuracy: 0.0_f32,
11252        flags: EstimatorStatusFlags::DEFAULT,
11253    };
11254    #[cfg(feature = "arbitrary")]
11255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11256        use arbitrary::{Arbitrary, Unstructured};
11257        let mut buf = [0u8; 1024];
11258        rng.fill_bytes(&mut buf);
11259        let mut unstructured = Unstructured::new(&buf);
11260        Self::arbitrary(&mut unstructured).unwrap_or_default()
11261    }
11262}
11263impl Default for ESTIMATOR_STATUS_DATA {
11264    fn default() -> Self {
11265        Self::DEFAULT.clone()
11266    }
11267}
11268impl MessageData for ESTIMATOR_STATUS_DATA {
11269    type Message = MavMessage;
11270    const ID: u32 = 230u32;
11271    const NAME: &'static str = "ESTIMATOR_STATUS";
11272    const EXTRA_CRC: u8 = 163u8;
11273    const ENCODED_LEN: usize = 42usize;
11274    fn deser(
11275        _version: MavlinkVersion,
11276        __input: &[u8],
11277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11278        let avail_len = __input.len();
11279        let mut payload_buf = [0; Self::ENCODED_LEN];
11280        let mut buf = if avail_len < Self::ENCODED_LEN {
11281            payload_buf[0..avail_len].copy_from_slice(__input);
11282            Bytes::new(&payload_buf)
11283        } else {
11284            Bytes::new(__input)
11285        };
11286        let mut __struct = Self::default();
11287        __struct.time_usec = buf.get_u64_le();
11288        __struct.vel_ratio = buf.get_f32_le();
11289        __struct.pos_horiz_ratio = buf.get_f32_le();
11290        __struct.pos_vert_ratio = buf.get_f32_le();
11291        __struct.mag_ratio = buf.get_f32_le();
11292        __struct.hagl_ratio = buf.get_f32_le();
11293        __struct.tas_ratio = buf.get_f32_le();
11294        __struct.pos_horiz_accuracy = buf.get_f32_le();
11295        __struct.pos_vert_accuracy = buf.get_f32_le();
11296        let tmp = buf.get_u16_le();
11297        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11298            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11299                flag_type: "EstimatorStatusFlags",
11300                value: tmp as u32,
11301            })?;
11302        Ok(__struct)
11303    }
11304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11305        let mut __tmp = BytesMut::new(bytes);
11306        #[allow(clippy::absurd_extreme_comparisons)]
11307        #[allow(unused_comparisons)]
11308        if __tmp.remaining() < Self::ENCODED_LEN {
11309            panic!(
11310                "buffer is too small (need {} bytes, but got {})",
11311                Self::ENCODED_LEN,
11312                __tmp.remaining(),
11313            )
11314        }
11315        __tmp.put_u64_le(self.time_usec);
11316        __tmp.put_f32_le(self.vel_ratio);
11317        __tmp.put_f32_le(self.pos_horiz_ratio);
11318        __tmp.put_f32_le(self.pos_vert_ratio);
11319        __tmp.put_f32_le(self.mag_ratio);
11320        __tmp.put_f32_le(self.hagl_ratio);
11321        __tmp.put_f32_le(self.tas_ratio);
11322        __tmp.put_f32_le(self.pos_horiz_accuracy);
11323        __tmp.put_f32_le(self.pos_vert_accuracy);
11324        __tmp.put_u16_le(self.flags.bits());
11325        if matches!(version, MavlinkVersion::V2) {
11326            let len = __tmp.len();
11327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11328        } else {
11329            __tmp.len()
11330        }
11331    }
11332}
11333#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11334#[doc = ""]
11335#[doc = "ID: 410"]
11336#[derive(Debug, Clone, PartialEq)]
11337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11339#[cfg_attr(feature = "ts", derive(TS))]
11340#[cfg_attr(feature = "ts", ts(export))]
11341pub struct EVENT_DATA {
11342    #[doc = "Event ID (as defined in the component metadata)"]
11343    pub id: u32,
11344    #[doc = "Timestamp (time since system boot when the event happened)."]
11345    pub event_time_boot_ms: u32,
11346    #[doc = "Sequence number."]
11347    pub sequence: u16,
11348    #[doc = "Component ID"]
11349    pub destination_component: u8,
11350    #[doc = "System ID"]
11351    pub destination_system: u8,
11352    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11353    pub log_levels: u8,
11354    #[doc = "Arguments (depend on event ID)."]
11355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11357    pub arguments: [u8; 40],
11358}
11359impl EVENT_DATA {
11360    pub const ENCODED_LEN: usize = 53usize;
11361    pub const DEFAULT: Self = Self {
11362        id: 0_u32,
11363        event_time_boot_ms: 0_u32,
11364        sequence: 0_u16,
11365        destination_component: 0_u8,
11366        destination_system: 0_u8,
11367        log_levels: 0_u8,
11368        arguments: [0_u8; 40usize],
11369    };
11370    #[cfg(feature = "arbitrary")]
11371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11372        use arbitrary::{Arbitrary, Unstructured};
11373        let mut buf = [0u8; 1024];
11374        rng.fill_bytes(&mut buf);
11375        let mut unstructured = Unstructured::new(&buf);
11376        Self::arbitrary(&mut unstructured).unwrap_or_default()
11377    }
11378}
11379impl Default for EVENT_DATA {
11380    fn default() -> Self {
11381        Self::DEFAULT.clone()
11382    }
11383}
11384impl MessageData for EVENT_DATA {
11385    type Message = MavMessage;
11386    const ID: u32 = 410u32;
11387    const NAME: &'static str = "EVENT";
11388    const EXTRA_CRC: u8 = 160u8;
11389    const ENCODED_LEN: usize = 53usize;
11390    fn deser(
11391        _version: MavlinkVersion,
11392        __input: &[u8],
11393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11394        let avail_len = __input.len();
11395        let mut payload_buf = [0; Self::ENCODED_LEN];
11396        let mut buf = if avail_len < Self::ENCODED_LEN {
11397            payload_buf[0..avail_len].copy_from_slice(__input);
11398            Bytes::new(&payload_buf)
11399        } else {
11400            Bytes::new(__input)
11401        };
11402        let mut __struct = Self::default();
11403        __struct.id = buf.get_u32_le();
11404        __struct.event_time_boot_ms = buf.get_u32_le();
11405        __struct.sequence = buf.get_u16_le();
11406        __struct.destination_component = buf.get_u8();
11407        __struct.destination_system = buf.get_u8();
11408        __struct.log_levels = buf.get_u8();
11409        for v in &mut __struct.arguments {
11410            let val = buf.get_u8();
11411            *v = val;
11412        }
11413        Ok(__struct)
11414    }
11415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11416        let mut __tmp = BytesMut::new(bytes);
11417        #[allow(clippy::absurd_extreme_comparisons)]
11418        #[allow(unused_comparisons)]
11419        if __tmp.remaining() < Self::ENCODED_LEN {
11420            panic!(
11421                "buffer is too small (need {} bytes, but got {})",
11422                Self::ENCODED_LEN,
11423                __tmp.remaining(),
11424            )
11425        }
11426        __tmp.put_u32_le(self.id);
11427        __tmp.put_u32_le(self.event_time_boot_ms);
11428        __tmp.put_u16_le(self.sequence);
11429        __tmp.put_u8(self.destination_component);
11430        __tmp.put_u8(self.destination_system);
11431        __tmp.put_u8(self.log_levels);
11432        for val in &self.arguments {
11433            __tmp.put_u8(*val);
11434        }
11435        if matches!(version, MavlinkVersion::V2) {
11436            let len = __tmp.len();
11437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11438        } else {
11439            __tmp.len()
11440        }
11441    }
11442}
11443#[doc = "Provides state for additional features."]
11444#[doc = ""]
11445#[doc = "ID: 245"]
11446#[derive(Debug, Clone, PartialEq)]
11447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11449#[cfg_attr(feature = "ts", derive(TS))]
11450#[cfg_attr(feature = "ts", ts(export))]
11451pub struct EXTENDED_SYS_STATE_DATA {
11452    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11453    pub vtol_state: MavVtolState,
11454    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11455    pub landed_state: MavLandedState,
11456}
11457impl EXTENDED_SYS_STATE_DATA {
11458    pub const ENCODED_LEN: usize = 2usize;
11459    pub const DEFAULT: Self = Self {
11460        vtol_state: MavVtolState::DEFAULT,
11461        landed_state: MavLandedState::DEFAULT,
11462    };
11463    #[cfg(feature = "arbitrary")]
11464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11465        use arbitrary::{Arbitrary, Unstructured};
11466        let mut buf = [0u8; 1024];
11467        rng.fill_bytes(&mut buf);
11468        let mut unstructured = Unstructured::new(&buf);
11469        Self::arbitrary(&mut unstructured).unwrap_or_default()
11470    }
11471}
11472impl Default for EXTENDED_SYS_STATE_DATA {
11473    fn default() -> Self {
11474        Self::DEFAULT.clone()
11475    }
11476}
11477impl MessageData for EXTENDED_SYS_STATE_DATA {
11478    type Message = MavMessage;
11479    const ID: u32 = 245u32;
11480    const NAME: &'static str = "EXTENDED_SYS_STATE";
11481    const EXTRA_CRC: u8 = 130u8;
11482    const ENCODED_LEN: usize = 2usize;
11483    fn deser(
11484        _version: MavlinkVersion,
11485        __input: &[u8],
11486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11487        let avail_len = __input.len();
11488        let mut payload_buf = [0; Self::ENCODED_LEN];
11489        let mut buf = if avail_len < Self::ENCODED_LEN {
11490            payload_buf[0..avail_len].copy_from_slice(__input);
11491            Bytes::new(&payload_buf)
11492        } else {
11493            Bytes::new(__input)
11494        };
11495        let mut __struct = Self::default();
11496        let tmp = buf.get_u8();
11497        __struct.vtol_state =
11498            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11499                enum_type: "MavVtolState",
11500                value: tmp as u32,
11501            })?;
11502        let tmp = buf.get_u8();
11503        __struct.landed_state =
11504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11505                enum_type: "MavLandedState",
11506                value: tmp as u32,
11507            })?;
11508        Ok(__struct)
11509    }
11510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11511        let mut __tmp = BytesMut::new(bytes);
11512        #[allow(clippy::absurd_extreme_comparisons)]
11513        #[allow(unused_comparisons)]
11514        if __tmp.remaining() < Self::ENCODED_LEN {
11515            panic!(
11516                "buffer is too small (need {} bytes, but got {})",
11517                Self::ENCODED_LEN,
11518                __tmp.remaining(),
11519            )
11520        }
11521        __tmp.put_u8(self.vtol_state as u8);
11522        __tmp.put_u8(self.landed_state as u8);
11523        if matches!(version, MavlinkVersion::V2) {
11524            let len = __tmp.len();
11525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11526        } else {
11527            __tmp.len()
11528        }
11529    }
11530}
11531#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11532#[doc = ""]
11533#[doc = "ID: 162"]
11534#[derive(Debug, Clone, PartialEq)]
11535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11537#[cfg_attr(feature = "ts", derive(TS))]
11538#[cfg_attr(feature = "ts", ts(export))]
11539pub struct FENCE_STATUS_DATA {
11540    #[doc = "Time (since boot) of last breach."]
11541    pub breach_time: u32,
11542    #[doc = "Number of fence breaches."]
11543    pub breach_count: u16,
11544    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11545    pub breach_status: u8,
11546    #[doc = "Last breach type."]
11547    pub breach_type: FenceBreach,
11548    #[doc = "Active action to prevent fence breach"]
11549    #[cfg_attr(feature = "serde", serde(default))]
11550    pub breach_mitigation: FenceMitigate,
11551}
11552impl FENCE_STATUS_DATA {
11553    pub const ENCODED_LEN: usize = 9usize;
11554    pub const DEFAULT: Self = Self {
11555        breach_time: 0_u32,
11556        breach_count: 0_u16,
11557        breach_status: 0_u8,
11558        breach_type: FenceBreach::DEFAULT,
11559        breach_mitigation: FenceMitigate::DEFAULT,
11560    };
11561    #[cfg(feature = "arbitrary")]
11562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11563        use arbitrary::{Arbitrary, Unstructured};
11564        let mut buf = [0u8; 1024];
11565        rng.fill_bytes(&mut buf);
11566        let mut unstructured = Unstructured::new(&buf);
11567        Self::arbitrary(&mut unstructured).unwrap_or_default()
11568    }
11569}
11570impl Default for FENCE_STATUS_DATA {
11571    fn default() -> Self {
11572        Self::DEFAULT.clone()
11573    }
11574}
11575impl MessageData for FENCE_STATUS_DATA {
11576    type Message = MavMessage;
11577    const ID: u32 = 162u32;
11578    const NAME: &'static str = "FENCE_STATUS";
11579    const EXTRA_CRC: u8 = 189u8;
11580    const ENCODED_LEN: usize = 9usize;
11581    fn deser(
11582        _version: MavlinkVersion,
11583        __input: &[u8],
11584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11585        let avail_len = __input.len();
11586        let mut payload_buf = [0; Self::ENCODED_LEN];
11587        let mut buf = if avail_len < Self::ENCODED_LEN {
11588            payload_buf[0..avail_len].copy_from_slice(__input);
11589            Bytes::new(&payload_buf)
11590        } else {
11591            Bytes::new(__input)
11592        };
11593        let mut __struct = Self::default();
11594        __struct.breach_time = buf.get_u32_le();
11595        __struct.breach_count = buf.get_u16_le();
11596        __struct.breach_status = buf.get_u8();
11597        let tmp = buf.get_u8();
11598        __struct.breach_type =
11599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11600                enum_type: "FenceBreach",
11601                value: tmp as u32,
11602            })?;
11603        let tmp = buf.get_u8();
11604        __struct.breach_mitigation =
11605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11606                enum_type: "FenceMitigate",
11607                value: tmp as u32,
11608            })?;
11609        Ok(__struct)
11610    }
11611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11612        let mut __tmp = BytesMut::new(bytes);
11613        #[allow(clippy::absurd_extreme_comparisons)]
11614        #[allow(unused_comparisons)]
11615        if __tmp.remaining() < Self::ENCODED_LEN {
11616            panic!(
11617                "buffer is too small (need {} bytes, but got {})",
11618                Self::ENCODED_LEN,
11619                __tmp.remaining(),
11620            )
11621        }
11622        __tmp.put_u32_le(self.breach_time);
11623        __tmp.put_u16_le(self.breach_count);
11624        __tmp.put_u8(self.breach_status);
11625        __tmp.put_u8(self.breach_type as u8);
11626        if matches!(version, MavlinkVersion::V2) {
11627            __tmp.put_u8(self.breach_mitigation as u8);
11628            let len = __tmp.len();
11629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11630        } else {
11631            __tmp.len()
11632        }
11633    }
11634}
11635#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11636#[doc = ""]
11637#[doc = "ID: 110"]
11638#[derive(Debug, Clone, PartialEq)]
11639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11641#[cfg_attr(feature = "ts", derive(TS))]
11642#[cfg_attr(feature = "ts", ts(export))]
11643pub struct FILE_TRANSFER_PROTOCOL_DATA {
11644    #[doc = "Network ID (0 for broadcast)"]
11645    pub target_network: u8,
11646    #[doc = "System ID (0 for broadcast)"]
11647    pub target_system: u8,
11648    #[doc = "Component ID (0 for broadcast)"]
11649    pub target_component: u8,
11650    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11651    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11652    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11653    pub payload: [u8; 251],
11654}
11655impl FILE_TRANSFER_PROTOCOL_DATA {
11656    pub const ENCODED_LEN: usize = 254usize;
11657    pub const DEFAULT: Self = Self {
11658        target_network: 0_u8,
11659        target_system: 0_u8,
11660        target_component: 0_u8,
11661        payload: [0_u8; 251usize],
11662    };
11663    #[cfg(feature = "arbitrary")]
11664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11665        use arbitrary::{Arbitrary, Unstructured};
11666        let mut buf = [0u8; 1024];
11667        rng.fill_bytes(&mut buf);
11668        let mut unstructured = Unstructured::new(&buf);
11669        Self::arbitrary(&mut unstructured).unwrap_or_default()
11670    }
11671}
11672impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11673    fn default() -> Self {
11674        Self::DEFAULT.clone()
11675    }
11676}
11677impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11678    type Message = MavMessage;
11679    const ID: u32 = 110u32;
11680    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11681    const EXTRA_CRC: u8 = 84u8;
11682    const ENCODED_LEN: usize = 254usize;
11683    fn deser(
11684        _version: MavlinkVersion,
11685        __input: &[u8],
11686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11687        let avail_len = __input.len();
11688        let mut payload_buf = [0; Self::ENCODED_LEN];
11689        let mut buf = if avail_len < Self::ENCODED_LEN {
11690            payload_buf[0..avail_len].copy_from_slice(__input);
11691            Bytes::new(&payload_buf)
11692        } else {
11693            Bytes::new(__input)
11694        };
11695        let mut __struct = Self::default();
11696        __struct.target_network = buf.get_u8();
11697        __struct.target_system = buf.get_u8();
11698        __struct.target_component = buf.get_u8();
11699        for v in &mut __struct.payload {
11700            let val = buf.get_u8();
11701            *v = val;
11702        }
11703        Ok(__struct)
11704    }
11705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11706        let mut __tmp = BytesMut::new(bytes);
11707        #[allow(clippy::absurd_extreme_comparisons)]
11708        #[allow(unused_comparisons)]
11709        if __tmp.remaining() < Self::ENCODED_LEN {
11710            panic!(
11711                "buffer is too small (need {} bytes, but got {})",
11712                Self::ENCODED_LEN,
11713                __tmp.remaining(),
11714            )
11715        }
11716        __tmp.put_u8(self.target_network);
11717        __tmp.put_u8(self.target_system);
11718        __tmp.put_u8(self.target_component);
11719        for val in &self.payload {
11720            __tmp.put_u8(*val);
11721        }
11722        if matches!(version, MavlinkVersion::V2) {
11723            let len = __tmp.len();
11724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11725        } else {
11726            __tmp.len()
11727        }
11728    }
11729}
11730#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11731#[doc = ""]
11732#[doc = "ID: 264"]
11733#[derive(Debug, Clone, PartialEq)]
11734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11736#[cfg_attr(feature = "ts", derive(TS))]
11737#[cfg_attr(feature = "ts", ts(export))]
11738pub struct FLIGHT_INFORMATION_DATA {
11739    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11740    pub arming_time_utc: u64,
11741    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11742    pub takeoff_time_utc: u64,
11743    #[doc = "Flight number. Note, field is misnamed UUID."]
11744    pub flight_uuid: u64,
11745    #[doc = "Timestamp (time since system boot)."]
11746    pub time_boot_ms: u32,
11747    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11748    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11749    pub landing_time: u32,
11750}
11751impl FLIGHT_INFORMATION_DATA {
11752    pub const ENCODED_LEN: usize = 32usize;
11753    pub const DEFAULT: Self = Self {
11754        arming_time_utc: 0_u64,
11755        takeoff_time_utc: 0_u64,
11756        flight_uuid: 0_u64,
11757        time_boot_ms: 0_u32,
11758        landing_time: 0_u32,
11759    };
11760    #[cfg(feature = "arbitrary")]
11761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11762        use arbitrary::{Arbitrary, Unstructured};
11763        let mut buf = [0u8; 1024];
11764        rng.fill_bytes(&mut buf);
11765        let mut unstructured = Unstructured::new(&buf);
11766        Self::arbitrary(&mut unstructured).unwrap_or_default()
11767    }
11768}
11769impl Default for FLIGHT_INFORMATION_DATA {
11770    fn default() -> Self {
11771        Self::DEFAULT.clone()
11772    }
11773}
11774impl MessageData for FLIGHT_INFORMATION_DATA {
11775    type Message = MavMessage;
11776    const ID: u32 = 264u32;
11777    const NAME: &'static str = "FLIGHT_INFORMATION";
11778    const EXTRA_CRC: u8 = 49u8;
11779    const ENCODED_LEN: usize = 32usize;
11780    fn deser(
11781        _version: MavlinkVersion,
11782        __input: &[u8],
11783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11784        let avail_len = __input.len();
11785        let mut payload_buf = [0; Self::ENCODED_LEN];
11786        let mut buf = if avail_len < Self::ENCODED_LEN {
11787            payload_buf[0..avail_len].copy_from_slice(__input);
11788            Bytes::new(&payload_buf)
11789        } else {
11790            Bytes::new(__input)
11791        };
11792        let mut __struct = Self::default();
11793        __struct.arming_time_utc = buf.get_u64_le();
11794        __struct.takeoff_time_utc = buf.get_u64_le();
11795        __struct.flight_uuid = buf.get_u64_le();
11796        __struct.time_boot_ms = buf.get_u32_le();
11797        __struct.landing_time = buf.get_u32_le();
11798        Ok(__struct)
11799    }
11800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11801        let mut __tmp = BytesMut::new(bytes);
11802        #[allow(clippy::absurd_extreme_comparisons)]
11803        #[allow(unused_comparisons)]
11804        if __tmp.remaining() < Self::ENCODED_LEN {
11805            panic!(
11806                "buffer is too small (need {} bytes, but got {})",
11807                Self::ENCODED_LEN,
11808                __tmp.remaining(),
11809            )
11810        }
11811        __tmp.put_u64_le(self.arming_time_utc);
11812        __tmp.put_u64_le(self.takeoff_time_utc);
11813        __tmp.put_u64_le(self.flight_uuid);
11814        __tmp.put_u32_le(self.time_boot_ms);
11815        if matches!(version, MavlinkVersion::V2) {
11816            __tmp.put_u32_le(self.landing_time);
11817            let len = __tmp.len();
11818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11819        } else {
11820            __tmp.len()
11821        }
11822    }
11823}
11824#[doc = "Current motion information from a designated system."]
11825#[doc = ""]
11826#[doc = "ID: 144"]
11827#[derive(Debug, Clone, PartialEq)]
11828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11830#[cfg_attr(feature = "ts", derive(TS))]
11831#[cfg_attr(feature = "ts", ts(export))]
11832pub struct FOLLOW_TARGET_DATA {
11833    #[doc = "Timestamp (time since system boot)."]
11834    pub timestamp: u64,
11835    #[doc = "button states or switches of a tracker device"]
11836    pub custom_state: u64,
11837    #[doc = "Latitude (WGS84)"]
11838    pub lat: i32,
11839    #[doc = "Longitude (WGS84)"]
11840    pub lon: i32,
11841    #[doc = "Altitude (MSL)"]
11842    pub alt: f32,
11843    #[doc = "target velocity (0,0,0) for unknown"]
11844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11845    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11846    pub vel: [f32; 3],
11847    #[doc = "linear target acceleration (0,0,0) for unknown"]
11848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11850    pub acc: [f32; 3],
11851    #[doc = "(0 0 0 0 for unknown)"]
11852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11853    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11854    pub attitude_q: [f32; 4],
11855    #[doc = "(0 0 0 for unknown)"]
11856    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11857    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11858    pub rates: [f32; 3],
11859    #[doc = "eph epv"]
11860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11862    pub position_cov: [f32; 3],
11863    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11864    pub est_capabilities: u8,
11865}
11866impl FOLLOW_TARGET_DATA {
11867    pub const ENCODED_LEN: usize = 93usize;
11868    pub const DEFAULT: Self = Self {
11869        timestamp: 0_u64,
11870        custom_state: 0_u64,
11871        lat: 0_i32,
11872        lon: 0_i32,
11873        alt: 0.0_f32,
11874        vel: [0.0_f32; 3usize],
11875        acc: [0.0_f32; 3usize],
11876        attitude_q: [0.0_f32; 4usize],
11877        rates: [0.0_f32; 3usize],
11878        position_cov: [0.0_f32; 3usize],
11879        est_capabilities: 0_u8,
11880    };
11881    #[cfg(feature = "arbitrary")]
11882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11883        use arbitrary::{Arbitrary, Unstructured};
11884        let mut buf = [0u8; 1024];
11885        rng.fill_bytes(&mut buf);
11886        let mut unstructured = Unstructured::new(&buf);
11887        Self::arbitrary(&mut unstructured).unwrap_or_default()
11888    }
11889}
11890impl Default for FOLLOW_TARGET_DATA {
11891    fn default() -> Self {
11892        Self::DEFAULT.clone()
11893    }
11894}
11895impl MessageData for FOLLOW_TARGET_DATA {
11896    type Message = MavMessage;
11897    const ID: u32 = 144u32;
11898    const NAME: &'static str = "FOLLOW_TARGET";
11899    const EXTRA_CRC: u8 = 127u8;
11900    const ENCODED_LEN: usize = 93usize;
11901    fn deser(
11902        _version: MavlinkVersion,
11903        __input: &[u8],
11904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11905        let avail_len = __input.len();
11906        let mut payload_buf = [0; Self::ENCODED_LEN];
11907        let mut buf = if avail_len < Self::ENCODED_LEN {
11908            payload_buf[0..avail_len].copy_from_slice(__input);
11909            Bytes::new(&payload_buf)
11910        } else {
11911            Bytes::new(__input)
11912        };
11913        let mut __struct = Self::default();
11914        __struct.timestamp = buf.get_u64_le();
11915        __struct.custom_state = buf.get_u64_le();
11916        __struct.lat = buf.get_i32_le();
11917        __struct.lon = buf.get_i32_le();
11918        __struct.alt = buf.get_f32_le();
11919        for v in &mut __struct.vel {
11920            let val = buf.get_f32_le();
11921            *v = val;
11922        }
11923        for v in &mut __struct.acc {
11924            let val = buf.get_f32_le();
11925            *v = val;
11926        }
11927        for v in &mut __struct.attitude_q {
11928            let val = buf.get_f32_le();
11929            *v = val;
11930        }
11931        for v in &mut __struct.rates {
11932            let val = buf.get_f32_le();
11933            *v = val;
11934        }
11935        for v in &mut __struct.position_cov {
11936            let val = buf.get_f32_le();
11937            *v = val;
11938        }
11939        __struct.est_capabilities = buf.get_u8();
11940        Ok(__struct)
11941    }
11942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11943        let mut __tmp = BytesMut::new(bytes);
11944        #[allow(clippy::absurd_extreme_comparisons)]
11945        #[allow(unused_comparisons)]
11946        if __tmp.remaining() < Self::ENCODED_LEN {
11947            panic!(
11948                "buffer is too small (need {} bytes, but got {})",
11949                Self::ENCODED_LEN,
11950                __tmp.remaining(),
11951            )
11952        }
11953        __tmp.put_u64_le(self.timestamp);
11954        __tmp.put_u64_le(self.custom_state);
11955        __tmp.put_i32_le(self.lat);
11956        __tmp.put_i32_le(self.lon);
11957        __tmp.put_f32_le(self.alt);
11958        for val in &self.vel {
11959            __tmp.put_f32_le(*val);
11960        }
11961        for val in &self.acc {
11962            __tmp.put_f32_le(*val);
11963        }
11964        for val in &self.attitude_q {
11965            __tmp.put_f32_le(*val);
11966        }
11967        for val in &self.rates {
11968            __tmp.put_f32_le(*val);
11969        }
11970        for val in &self.position_cov {
11971            __tmp.put_f32_le(*val);
11972        }
11973        __tmp.put_u8(self.est_capabilities);
11974        if matches!(version, MavlinkVersion::V2) {
11975            let len = __tmp.len();
11976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11977        } else {
11978            __tmp.len()
11979        }
11980    }
11981}
11982#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11983#[doc = ""]
11984#[doc = "ID: 371"]
11985#[derive(Debug, Clone, PartialEq)]
11986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11988#[cfg_attr(feature = "ts", derive(TS))]
11989#[cfg_attr(feature = "ts", ts(export))]
11990pub struct FUEL_STATUS_DATA {
11991    #[doc = "Capacity when full. Must be provided."]
11992    pub maximum_fuel: f32,
11993    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11994    pub consumed_fuel: f32,
11995    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11996    pub remaining_fuel: f32,
11997    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11998    pub flow_rate: f32,
11999    #[doc = "Fuel temperature. NaN: field not provided."]
12000    pub temperature: f32,
12001    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12002    pub fuel_type: MavFuelType,
12003    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12004    pub id: u8,
12005    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12006    pub percent_remaining: u8,
12007}
12008impl FUEL_STATUS_DATA {
12009    pub const ENCODED_LEN: usize = 26usize;
12010    pub const DEFAULT: Self = Self {
12011        maximum_fuel: 0.0_f32,
12012        consumed_fuel: 0.0_f32,
12013        remaining_fuel: 0.0_f32,
12014        flow_rate: 0.0_f32,
12015        temperature: 0.0_f32,
12016        fuel_type: MavFuelType::DEFAULT,
12017        id: 0_u8,
12018        percent_remaining: 0_u8,
12019    };
12020    #[cfg(feature = "arbitrary")]
12021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12022        use arbitrary::{Arbitrary, Unstructured};
12023        let mut buf = [0u8; 1024];
12024        rng.fill_bytes(&mut buf);
12025        let mut unstructured = Unstructured::new(&buf);
12026        Self::arbitrary(&mut unstructured).unwrap_or_default()
12027    }
12028}
12029impl Default for FUEL_STATUS_DATA {
12030    fn default() -> Self {
12031        Self::DEFAULT.clone()
12032    }
12033}
12034impl MessageData for FUEL_STATUS_DATA {
12035    type Message = MavMessage;
12036    const ID: u32 = 371u32;
12037    const NAME: &'static str = "FUEL_STATUS";
12038    const EXTRA_CRC: u8 = 10u8;
12039    const ENCODED_LEN: usize = 26usize;
12040    fn deser(
12041        _version: MavlinkVersion,
12042        __input: &[u8],
12043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12044        let avail_len = __input.len();
12045        let mut payload_buf = [0; Self::ENCODED_LEN];
12046        let mut buf = if avail_len < Self::ENCODED_LEN {
12047            payload_buf[0..avail_len].copy_from_slice(__input);
12048            Bytes::new(&payload_buf)
12049        } else {
12050            Bytes::new(__input)
12051        };
12052        let mut __struct = Self::default();
12053        __struct.maximum_fuel = buf.get_f32_le();
12054        __struct.consumed_fuel = buf.get_f32_le();
12055        __struct.remaining_fuel = buf.get_f32_le();
12056        __struct.flow_rate = buf.get_f32_le();
12057        __struct.temperature = buf.get_f32_le();
12058        let tmp = buf.get_u32_le();
12059        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12060            ::mavlink_core::error::ParserError::InvalidEnum {
12061                enum_type: "MavFuelType",
12062                value: tmp as u32,
12063            },
12064        )?;
12065        __struct.id = buf.get_u8();
12066        __struct.percent_remaining = buf.get_u8();
12067        Ok(__struct)
12068    }
12069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12070        let mut __tmp = BytesMut::new(bytes);
12071        #[allow(clippy::absurd_extreme_comparisons)]
12072        #[allow(unused_comparisons)]
12073        if __tmp.remaining() < Self::ENCODED_LEN {
12074            panic!(
12075                "buffer is too small (need {} bytes, but got {})",
12076                Self::ENCODED_LEN,
12077                __tmp.remaining(),
12078            )
12079        }
12080        __tmp.put_f32_le(self.maximum_fuel);
12081        __tmp.put_f32_le(self.consumed_fuel);
12082        __tmp.put_f32_le(self.remaining_fuel);
12083        __tmp.put_f32_le(self.flow_rate);
12084        __tmp.put_f32_le(self.temperature);
12085        __tmp.put_u32_le(self.fuel_type as u32);
12086        __tmp.put_u8(self.id);
12087        __tmp.put_u8(self.percent_remaining);
12088        if matches!(version, MavlinkVersion::V2) {
12089            let len = __tmp.len();
12090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12091        } else {
12092            __tmp.len()
12093        }
12094    }
12095}
12096#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12097#[doc = ""]
12098#[doc = "ID: 373"]
12099#[derive(Debug, Clone, PartialEq)]
12100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12102#[cfg_attr(feature = "ts", derive(TS))]
12103#[cfg_attr(feature = "ts", ts(export))]
12104pub struct GENERATOR_STATUS_DATA {
12105    #[doc = "Status flags."]
12106    pub status: MavGeneratorStatusFlag,
12107    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12108    pub battery_current: f32,
12109    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12110    pub load_current: f32,
12111    #[doc = "The power being generated. NaN: field not provided"]
12112    pub power_generated: f32,
12113    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12114    pub bus_voltage: f32,
12115    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12116    pub bat_current_setpoint: f32,
12117    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12118    pub runtime: u32,
12119    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12120    pub time_until_maintenance: i32,
12121    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12122    pub generator_speed: u16,
12123    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12124    pub rectifier_temperature: i16,
12125    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12126    pub generator_temperature: i16,
12127}
12128impl GENERATOR_STATUS_DATA {
12129    pub const ENCODED_LEN: usize = 42usize;
12130    pub const DEFAULT: Self = Self {
12131        status: MavGeneratorStatusFlag::DEFAULT,
12132        battery_current: 0.0_f32,
12133        load_current: 0.0_f32,
12134        power_generated: 0.0_f32,
12135        bus_voltage: 0.0_f32,
12136        bat_current_setpoint: 0.0_f32,
12137        runtime: 0_u32,
12138        time_until_maintenance: 0_i32,
12139        generator_speed: 0_u16,
12140        rectifier_temperature: 0_i16,
12141        generator_temperature: 0_i16,
12142    };
12143    #[cfg(feature = "arbitrary")]
12144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12145        use arbitrary::{Arbitrary, Unstructured};
12146        let mut buf = [0u8; 1024];
12147        rng.fill_bytes(&mut buf);
12148        let mut unstructured = Unstructured::new(&buf);
12149        Self::arbitrary(&mut unstructured).unwrap_or_default()
12150    }
12151}
12152impl Default for GENERATOR_STATUS_DATA {
12153    fn default() -> Self {
12154        Self::DEFAULT.clone()
12155    }
12156}
12157impl MessageData for GENERATOR_STATUS_DATA {
12158    type Message = MavMessage;
12159    const ID: u32 = 373u32;
12160    const NAME: &'static str = "GENERATOR_STATUS";
12161    const EXTRA_CRC: u8 = 117u8;
12162    const ENCODED_LEN: usize = 42usize;
12163    fn deser(
12164        _version: MavlinkVersion,
12165        __input: &[u8],
12166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12167        let avail_len = __input.len();
12168        let mut payload_buf = [0; Self::ENCODED_LEN];
12169        let mut buf = if avail_len < Self::ENCODED_LEN {
12170            payload_buf[0..avail_len].copy_from_slice(__input);
12171            Bytes::new(&payload_buf)
12172        } else {
12173            Bytes::new(__input)
12174        };
12175        let mut __struct = Self::default();
12176        let tmp = buf.get_u64_le();
12177        __struct.status = MavGeneratorStatusFlag::from_bits(
12178            tmp & MavGeneratorStatusFlag::all().bits(),
12179        )
12180        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12181            flag_type: "MavGeneratorStatusFlag",
12182            value: tmp as u32,
12183        })?;
12184        __struct.battery_current = buf.get_f32_le();
12185        __struct.load_current = buf.get_f32_le();
12186        __struct.power_generated = buf.get_f32_le();
12187        __struct.bus_voltage = buf.get_f32_le();
12188        __struct.bat_current_setpoint = buf.get_f32_le();
12189        __struct.runtime = buf.get_u32_le();
12190        __struct.time_until_maintenance = buf.get_i32_le();
12191        __struct.generator_speed = buf.get_u16_le();
12192        __struct.rectifier_temperature = buf.get_i16_le();
12193        __struct.generator_temperature = buf.get_i16_le();
12194        Ok(__struct)
12195    }
12196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12197        let mut __tmp = BytesMut::new(bytes);
12198        #[allow(clippy::absurd_extreme_comparisons)]
12199        #[allow(unused_comparisons)]
12200        if __tmp.remaining() < Self::ENCODED_LEN {
12201            panic!(
12202                "buffer is too small (need {} bytes, but got {})",
12203                Self::ENCODED_LEN,
12204                __tmp.remaining(),
12205            )
12206        }
12207        __tmp.put_u64_le(self.status.bits());
12208        __tmp.put_f32_le(self.battery_current);
12209        __tmp.put_f32_le(self.load_current);
12210        __tmp.put_f32_le(self.power_generated);
12211        __tmp.put_f32_le(self.bus_voltage);
12212        __tmp.put_f32_le(self.bat_current_setpoint);
12213        __tmp.put_u32_le(self.runtime);
12214        __tmp.put_i32_le(self.time_until_maintenance);
12215        __tmp.put_u16_le(self.generator_speed);
12216        __tmp.put_i16_le(self.rectifier_temperature);
12217        __tmp.put_i16_le(self.generator_temperature);
12218        if matches!(version, MavlinkVersion::V2) {
12219            let len = __tmp.len();
12220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12221        } else {
12222            __tmp.len()
12223        }
12224    }
12225}
12226#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12227#[doc = ""]
12228#[doc = "ID: 285"]
12229#[derive(Debug, Clone, PartialEq)]
12230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12232#[cfg_attr(feature = "ts", derive(TS))]
12233#[cfg_attr(feature = "ts", ts(export))]
12234pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12235    #[doc = "Timestamp (time since system boot)."]
12236    pub time_boot_ms: u32,
12237    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12240    pub q: [f32; 4],
12241    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12242    pub angular_velocity_x: f32,
12243    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12244    pub angular_velocity_y: f32,
12245    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12246    pub angular_velocity_z: f32,
12247    #[doc = "Failure flags (0 for no failure)"]
12248    pub failure_flags: GimbalDeviceErrorFlags,
12249    #[doc = "Current gimbal flags set."]
12250    pub flags: GimbalDeviceFlags,
12251    #[doc = "System ID"]
12252    pub target_system: u8,
12253    #[doc = "Component ID"]
12254    pub target_component: u8,
12255    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12257    pub delta_yaw: f32,
12258    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12260    pub delta_yaw_velocity: f32,
12261    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12262    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12263    pub gimbal_device_id: u8,
12264}
12265impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12266    pub const ENCODED_LEN: usize = 49usize;
12267    pub const DEFAULT: Self = Self {
12268        time_boot_ms: 0_u32,
12269        q: [0.0_f32; 4usize],
12270        angular_velocity_x: 0.0_f32,
12271        angular_velocity_y: 0.0_f32,
12272        angular_velocity_z: 0.0_f32,
12273        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12274        flags: GimbalDeviceFlags::DEFAULT,
12275        target_system: 0_u8,
12276        target_component: 0_u8,
12277        delta_yaw: 0.0_f32,
12278        delta_yaw_velocity: 0.0_f32,
12279        gimbal_device_id: 0_u8,
12280    };
12281    #[cfg(feature = "arbitrary")]
12282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12283        use arbitrary::{Arbitrary, Unstructured};
12284        let mut buf = [0u8; 1024];
12285        rng.fill_bytes(&mut buf);
12286        let mut unstructured = Unstructured::new(&buf);
12287        Self::arbitrary(&mut unstructured).unwrap_or_default()
12288    }
12289}
12290impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12291    fn default() -> Self {
12292        Self::DEFAULT.clone()
12293    }
12294}
12295impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12296    type Message = MavMessage;
12297    const ID: u32 = 285u32;
12298    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12299    const EXTRA_CRC: u8 = 137u8;
12300    const ENCODED_LEN: usize = 49usize;
12301    fn deser(
12302        _version: MavlinkVersion,
12303        __input: &[u8],
12304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12305        let avail_len = __input.len();
12306        let mut payload_buf = [0; Self::ENCODED_LEN];
12307        let mut buf = if avail_len < Self::ENCODED_LEN {
12308            payload_buf[0..avail_len].copy_from_slice(__input);
12309            Bytes::new(&payload_buf)
12310        } else {
12311            Bytes::new(__input)
12312        };
12313        let mut __struct = Self::default();
12314        __struct.time_boot_ms = buf.get_u32_le();
12315        for v in &mut __struct.q {
12316            let val = buf.get_f32_le();
12317            *v = val;
12318        }
12319        __struct.angular_velocity_x = buf.get_f32_le();
12320        __struct.angular_velocity_y = buf.get_f32_le();
12321        __struct.angular_velocity_z = buf.get_f32_le();
12322        let tmp = buf.get_u32_le();
12323        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12324            tmp & GimbalDeviceErrorFlags::all().bits(),
12325        )
12326        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12327            flag_type: "GimbalDeviceErrorFlags",
12328            value: tmp as u32,
12329        })?;
12330        let tmp = buf.get_u16_le();
12331        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12332            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12333                flag_type: "GimbalDeviceFlags",
12334                value: tmp as u32,
12335            })?;
12336        __struct.target_system = buf.get_u8();
12337        __struct.target_component = buf.get_u8();
12338        __struct.delta_yaw = buf.get_f32_le();
12339        __struct.delta_yaw_velocity = buf.get_f32_le();
12340        __struct.gimbal_device_id = buf.get_u8();
12341        Ok(__struct)
12342    }
12343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12344        let mut __tmp = BytesMut::new(bytes);
12345        #[allow(clippy::absurd_extreme_comparisons)]
12346        #[allow(unused_comparisons)]
12347        if __tmp.remaining() < Self::ENCODED_LEN {
12348            panic!(
12349                "buffer is too small (need {} bytes, but got {})",
12350                Self::ENCODED_LEN,
12351                __tmp.remaining(),
12352            )
12353        }
12354        __tmp.put_u32_le(self.time_boot_ms);
12355        for val in &self.q {
12356            __tmp.put_f32_le(*val);
12357        }
12358        __tmp.put_f32_le(self.angular_velocity_x);
12359        __tmp.put_f32_le(self.angular_velocity_y);
12360        __tmp.put_f32_le(self.angular_velocity_z);
12361        __tmp.put_u32_le(self.failure_flags.bits());
12362        __tmp.put_u16_le(self.flags.bits());
12363        __tmp.put_u8(self.target_system);
12364        __tmp.put_u8(self.target_component);
12365        if matches!(version, MavlinkVersion::V2) {
12366            __tmp.put_f32_le(self.delta_yaw);
12367            __tmp.put_f32_le(self.delta_yaw_velocity);
12368            __tmp.put_u8(self.gimbal_device_id);
12369            let len = __tmp.len();
12370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12371        } else {
12372            __tmp.len()
12373        }
12374    }
12375}
12376#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12377#[doc = ""]
12378#[doc = "ID: 283"]
12379#[derive(Debug, Clone, PartialEq)]
12380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12382#[cfg_attr(feature = "ts", derive(TS))]
12383#[cfg_attr(feature = "ts", ts(export))]
12384pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12385    #[doc = "UID of gimbal hardware (0 if unknown)."]
12386    pub uid: u64,
12387    #[doc = "Timestamp (time since system boot)."]
12388    pub time_boot_ms: u32,
12389    #[doc = "0xff)."]
12390    pub firmware_version: u32,
12391    #[doc = "0xff)."]
12392    pub hardware_version: u32,
12393    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12394    pub roll_min: f32,
12395    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12396    pub roll_max: f32,
12397    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12398    pub pitch_min: f32,
12399    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12400    pub pitch_max: f32,
12401    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12402    pub yaw_min: f32,
12403    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12404    pub yaw_max: f32,
12405    #[doc = "Bitmap of gimbal capability flags."]
12406    pub cap_flags: GimbalDeviceCapFlags,
12407    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12408    pub custom_cap_flags: u16,
12409    #[doc = "Name of the gimbal vendor."]
12410    #[cfg_attr(feature = "ts", ts(type = "string"))]
12411    pub vendor_name: CharArray<32>,
12412    #[doc = "Name of the gimbal model."]
12413    #[cfg_attr(feature = "ts", ts(type = "string"))]
12414    pub model_name: CharArray<32>,
12415    #[doc = "Custom name of the gimbal given to it by the user."]
12416    #[cfg_attr(feature = "ts", ts(type = "string"))]
12417    pub custom_name: CharArray<32>,
12418    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12420    pub gimbal_device_id: u8,
12421}
12422impl GIMBAL_DEVICE_INFORMATION_DATA {
12423    pub const ENCODED_LEN: usize = 145usize;
12424    pub const DEFAULT: Self = Self {
12425        uid: 0_u64,
12426        time_boot_ms: 0_u32,
12427        firmware_version: 0_u32,
12428        hardware_version: 0_u32,
12429        roll_min: 0.0_f32,
12430        roll_max: 0.0_f32,
12431        pitch_min: 0.0_f32,
12432        pitch_max: 0.0_f32,
12433        yaw_min: 0.0_f32,
12434        yaw_max: 0.0_f32,
12435        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12436        custom_cap_flags: 0_u16,
12437        vendor_name: CharArray::new([0_u8; 32usize]),
12438        model_name: CharArray::new([0_u8; 32usize]),
12439        custom_name: CharArray::new([0_u8; 32usize]),
12440        gimbal_device_id: 0_u8,
12441    };
12442    #[cfg(feature = "arbitrary")]
12443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12444        use arbitrary::{Arbitrary, Unstructured};
12445        let mut buf = [0u8; 1024];
12446        rng.fill_bytes(&mut buf);
12447        let mut unstructured = Unstructured::new(&buf);
12448        Self::arbitrary(&mut unstructured).unwrap_or_default()
12449    }
12450}
12451impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12452    fn default() -> Self {
12453        Self::DEFAULT.clone()
12454    }
12455}
12456impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12457    type Message = MavMessage;
12458    const ID: u32 = 283u32;
12459    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12460    const EXTRA_CRC: u8 = 74u8;
12461    const ENCODED_LEN: usize = 145usize;
12462    fn deser(
12463        _version: MavlinkVersion,
12464        __input: &[u8],
12465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12466        let avail_len = __input.len();
12467        let mut payload_buf = [0; Self::ENCODED_LEN];
12468        let mut buf = if avail_len < Self::ENCODED_LEN {
12469            payload_buf[0..avail_len].copy_from_slice(__input);
12470            Bytes::new(&payload_buf)
12471        } else {
12472            Bytes::new(__input)
12473        };
12474        let mut __struct = Self::default();
12475        __struct.uid = buf.get_u64_le();
12476        __struct.time_boot_ms = buf.get_u32_le();
12477        __struct.firmware_version = buf.get_u32_le();
12478        __struct.hardware_version = buf.get_u32_le();
12479        __struct.roll_min = buf.get_f32_le();
12480        __struct.roll_max = buf.get_f32_le();
12481        __struct.pitch_min = buf.get_f32_le();
12482        __struct.pitch_max = buf.get_f32_le();
12483        __struct.yaw_min = buf.get_f32_le();
12484        __struct.yaw_max = buf.get_f32_le();
12485        let tmp = buf.get_u16_le();
12486        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12487            tmp & GimbalDeviceCapFlags::all().bits(),
12488        )
12489        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12490            flag_type: "GimbalDeviceCapFlags",
12491            value: tmp as u32,
12492        })?;
12493        __struct.custom_cap_flags = buf.get_u16_le();
12494        let mut tmp = [0_u8; 32usize];
12495        for v in &mut tmp {
12496            *v = buf.get_u8();
12497        }
12498        __struct.vendor_name = CharArray::new(tmp);
12499        let mut tmp = [0_u8; 32usize];
12500        for v in &mut tmp {
12501            *v = buf.get_u8();
12502        }
12503        __struct.model_name = CharArray::new(tmp);
12504        let mut tmp = [0_u8; 32usize];
12505        for v in &mut tmp {
12506            *v = buf.get_u8();
12507        }
12508        __struct.custom_name = CharArray::new(tmp);
12509        __struct.gimbal_device_id = buf.get_u8();
12510        Ok(__struct)
12511    }
12512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12513        let mut __tmp = BytesMut::new(bytes);
12514        #[allow(clippy::absurd_extreme_comparisons)]
12515        #[allow(unused_comparisons)]
12516        if __tmp.remaining() < Self::ENCODED_LEN {
12517            panic!(
12518                "buffer is too small (need {} bytes, but got {})",
12519                Self::ENCODED_LEN,
12520                __tmp.remaining(),
12521            )
12522        }
12523        __tmp.put_u64_le(self.uid);
12524        __tmp.put_u32_le(self.time_boot_ms);
12525        __tmp.put_u32_le(self.firmware_version);
12526        __tmp.put_u32_le(self.hardware_version);
12527        __tmp.put_f32_le(self.roll_min);
12528        __tmp.put_f32_le(self.roll_max);
12529        __tmp.put_f32_le(self.pitch_min);
12530        __tmp.put_f32_le(self.pitch_max);
12531        __tmp.put_f32_le(self.yaw_min);
12532        __tmp.put_f32_le(self.yaw_max);
12533        __tmp.put_u16_le(self.cap_flags.bits());
12534        __tmp.put_u16_le(self.custom_cap_flags);
12535        for val in &self.vendor_name {
12536            __tmp.put_u8(*val);
12537        }
12538        for val in &self.model_name {
12539            __tmp.put_u8(*val);
12540        }
12541        for val in &self.custom_name {
12542            __tmp.put_u8(*val);
12543        }
12544        if matches!(version, MavlinkVersion::V2) {
12545            __tmp.put_u8(self.gimbal_device_id);
12546            let len = __tmp.len();
12547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12548        } else {
12549            __tmp.len()
12550        }
12551    }
12552}
12553#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12554#[doc = ""]
12555#[doc = "ID: 284"]
12556#[derive(Debug, Clone, PartialEq)]
12557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12559#[cfg_attr(feature = "ts", derive(TS))]
12560#[cfg_attr(feature = "ts", ts(export))]
12561pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12562    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12564    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12565    pub q: [f32; 4],
12566    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12567    pub angular_velocity_x: f32,
12568    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12569    pub angular_velocity_y: f32,
12570    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12571    pub angular_velocity_z: f32,
12572    #[doc = "Low level gimbal flags."]
12573    pub flags: GimbalDeviceFlags,
12574    #[doc = "System ID"]
12575    pub target_system: u8,
12576    #[doc = "Component ID"]
12577    pub target_component: u8,
12578}
12579impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12580    pub const ENCODED_LEN: usize = 32usize;
12581    pub const DEFAULT: Self = Self {
12582        q: [0.0_f32; 4usize],
12583        angular_velocity_x: 0.0_f32,
12584        angular_velocity_y: 0.0_f32,
12585        angular_velocity_z: 0.0_f32,
12586        flags: GimbalDeviceFlags::DEFAULT,
12587        target_system: 0_u8,
12588        target_component: 0_u8,
12589    };
12590    #[cfg(feature = "arbitrary")]
12591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12592        use arbitrary::{Arbitrary, Unstructured};
12593        let mut buf = [0u8; 1024];
12594        rng.fill_bytes(&mut buf);
12595        let mut unstructured = Unstructured::new(&buf);
12596        Self::arbitrary(&mut unstructured).unwrap_or_default()
12597    }
12598}
12599impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12600    fn default() -> Self {
12601        Self::DEFAULT.clone()
12602    }
12603}
12604impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12605    type Message = MavMessage;
12606    const ID: u32 = 284u32;
12607    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12608    const EXTRA_CRC: u8 = 99u8;
12609    const ENCODED_LEN: usize = 32usize;
12610    fn deser(
12611        _version: MavlinkVersion,
12612        __input: &[u8],
12613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12614        let avail_len = __input.len();
12615        let mut payload_buf = [0; Self::ENCODED_LEN];
12616        let mut buf = if avail_len < Self::ENCODED_LEN {
12617            payload_buf[0..avail_len].copy_from_slice(__input);
12618            Bytes::new(&payload_buf)
12619        } else {
12620            Bytes::new(__input)
12621        };
12622        let mut __struct = Self::default();
12623        for v in &mut __struct.q {
12624            let val = buf.get_f32_le();
12625            *v = val;
12626        }
12627        __struct.angular_velocity_x = buf.get_f32_le();
12628        __struct.angular_velocity_y = buf.get_f32_le();
12629        __struct.angular_velocity_z = buf.get_f32_le();
12630        let tmp = buf.get_u16_le();
12631        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12632            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12633                flag_type: "GimbalDeviceFlags",
12634                value: tmp as u32,
12635            })?;
12636        __struct.target_system = buf.get_u8();
12637        __struct.target_component = buf.get_u8();
12638        Ok(__struct)
12639    }
12640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12641        let mut __tmp = BytesMut::new(bytes);
12642        #[allow(clippy::absurd_extreme_comparisons)]
12643        #[allow(unused_comparisons)]
12644        if __tmp.remaining() < Self::ENCODED_LEN {
12645            panic!(
12646                "buffer is too small (need {} bytes, but got {})",
12647                Self::ENCODED_LEN,
12648                __tmp.remaining(),
12649            )
12650        }
12651        for val in &self.q {
12652            __tmp.put_f32_le(*val);
12653        }
12654        __tmp.put_f32_le(self.angular_velocity_x);
12655        __tmp.put_f32_le(self.angular_velocity_y);
12656        __tmp.put_f32_le(self.angular_velocity_z);
12657        __tmp.put_u16_le(self.flags.bits());
12658        __tmp.put_u8(self.target_system);
12659        __tmp.put_u8(self.target_component);
12660        if matches!(version, MavlinkVersion::V2) {
12661            let len = __tmp.len();
12662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12663        } else {
12664            __tmp.len()
12665        }
12666    }
12667}
12668#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12669#[doc = ""]
12670#[doc = "ID: 280"]
12671#[derive(Debug, Clone, PartialEq)]
12672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12674#[cfg_attr(feature = "ts", derive(TS))]
12675#[cfg_attr(feature = "ts", ts(export))]
12676pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12677    #[doc = "Timestamp (time since system boot)."]
12678    pub time_boot_ms: u32,
12679    #[doc = "Bitmap of gimbal capability flags."]
12680    pub cap_flags: GimbalManagerCapFlags,
12681    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12682    pub roll_min: f32,
12683    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12684    pub roll_max: f32,
12685    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12686    pub pitch_min: f32,
12687    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12688    pub pitch_max: f32,
12689    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12690    pub yaw_min: f32,
12691    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12692    pub yaw_max: f32,
12693    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12694    pub gimbal_device_id: u8,
12695}
12696impl GIMBAL_MANAGER_INFORMATION_DATA {
12697    pub const ENCODED_LEN: usize = 33usize;
12698    pub const DEFAULT: Self = Self {
12699        time_boot_ms: 0_u32,
12700        cap_flags: GimbalManagerCapFlags::DEFAULT,
12701        roll_min: 0.0_f32,
12702        roll_max: 0.0_f32,
12703        pitch_min: 0.0_f32,
12704        pitch_max: 0.0_f32,
12705        yaw_min: 0.0_f32,
12706        yaw_max: 0.0_f32,
12707        gimbal_device_id: 0_u8,
12708    };
12709    #[cfg(feature = "arbitrary")]
12710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12711        use arbitrary::{Arbitrary, Unstructured};
12712        let mut buf = [0u8; 1024];
12713        rng.fill_bytes(&mut buf);
12714        let mut unstructured = Unstructured::new(&buf);
12715        Self::arbitrary(&mut unstructured).unwrap_or_default()
12716    }
12717}
12718impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12719    fn default() -> Self {
12720        Self::DEFAULT.clone()
12721    }
12722}
12723impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12724    type Message = MavMessage;
12725    const ID: u32 = 280u32;
12726    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12727    const EXTRA_CRC: u8 = 70u8;
12728    const ENCODED_LEN: usize = 33usize;
12729    fn deser(
12730        _version: MavlinkVersion,
12731        __input: &[u8],
12732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12733        let avail_len = __input.len();
12734        let mut payload_buf = [0; Self::ENCODED_LEN];
12735        let mut buf = if avail_len < Self::ENCODED_LEN {
12736            payload_buf[0..avail_len].copy_from_slice(__input);
12737            Bytes::new(&payload_buf)
12738        } else {
12739            Bytes::new(__input)
12740        };
12741        let mut __struct = Self::default();
12742        __struct.time_boot_ms = buf.get_u32_le();
12743        let tmp = buf.get_u32_le();
12744        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12745            tmp & GimbalManagerCapFlags::all().bits(),
12746        )
12747        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12748            flag_type: "GimbalManagerCapFlags",
12749            value: tmp as u32,
12750        })?;
12751        __struct.roll_min = buf.get_f32_le();
12752        __struct.roll_max = buf.get_f32_le();
12753        __struct.pitch_min = buf.get_f32_le();
12754        __struct.pitch_max = buf.get_f32_le();
12755        __struct.yaw_min = buf.get_f32_le();
12756        __struct.yaw_max = buf.get_f32_le();
12757        __struct.gimbal_device_id = buf.get_u8();
12758        Ok(__struct)
12759    }
12760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12761        let mut __tmp = BytesMut::new(bytes);
12762        #[allow(clippy::absurd_extreme_comparisons)]
12763        #[allow(unused_comparisons)]
12764        if __tmp.remaining() < Self::ENCODED_LEN {
12765            panic!(
12766                "buffer is too small (need {} bytes, but got {})",
12767                Self::ENCODED_LEN,
12768                __tmp.remaining(),
12769            )
12770        }
12771        __tmp.put_u32_le(self.time_boot_ms);
12772        __tmp.put_u32_le(self.cap_flags.bits());
12773        __tmp.put_f32_le(self.roll_min);
12774        __tmp.put_f32_le(self.roll_max);
12775        __tmp.put_f32_le(self.pitch_min);
12776        __tmp.put_f32_le(self.pitch_max);
12777        __tmp.put_f32_le(self.yaw_min);
12778        __tmp.put_f32_le(self.yaw_max);
12779        __tmp.put_u8(self.gimbal_device_id);
12780        if matches!(version, MavlinkVersion::V2) {
12781            let len = __tmp.len();
12782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12783        } else {
12784            __tmp.len()
12785        }
12786    }
12787}
12788#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12789#[doc = ""]
12790#[doc = "ID: 282"]
12791#[derive(Debug, Clone, PartialEq)]
12792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12794#[cfg_attr(feature = "ts", derive(TS))]
12795#[cfg_attr(feature = "ts", ts(export))]
12796pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12797    #[doc = "High level gimbal manager flags to use."]
12798    pub flags: GimbalManagerFlags,
12799    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12801    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12802    pub q: [f32; 4],
12803    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12804    pub angular_velocity_x: f32,
12805    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12806    pub angular_velocity_y: f32,
12807    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12808    pub angular_velocity_z: f32,
12809    #[doc = "System ID"]
12810    pub target_system: u8,
12811    #[doc = "Component ID"]
12812    pub target_component: u8,
12813    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12814    pub gimbal_device_id: u8,
12815}
12816impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12817    pub const ENCODED_LEN: usize = 35usize;
12818    pub const DEFAULT: Self = Self {
12819        flags: GimbalManagerFlags::DEFAULT,
12820        q: [0.0_f32; 4usize],
12821        angular_velocity_x: 0.0_f32,
12822        angular_velocity_y: 0.0_f32,
12823        angular_velocity_z: 0.0_f32,
12824        target_system: 0_u8,
12825        target_component: 0_u8,
12826        gimbal_device_id: 0_u8,
12827    };
12828    #[cfg(feature = "arbitrary")]
12829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12830        use arbitrary::{Arbitrary, Unstructured};
12831        let mut buf = [0u8; 1024];
12832        rng.fill_bytes(&mut buf);
12833        let mut unstructured = Unstructured::new(&buf);
12834        Self::arbitrary(&mut unstructured).unwrap_or_default()
12835    }
12836}
12837impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12838    fn default() -> Self {
12839        Self::DEFAULT.clone()
12840    }
12841}
12842impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12843    type Message = MavMessage;
12844    const ID: u32 = 282u32;
12845    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12846    const EXTRA_CRC: u8 = 123u8;
12847    const ENCODED_LEN: usize = 35usize;
12848    fn deser(
12849        _version: MavlinkVersion,
12850        __input: &[u8],
12851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12852        let avail_len = __input.len();
12853        let mut payload_buf = [0; Self::ENCODED_LEN];
12854        let mut buf = if avail_len < Self::ENCODED_LEN {
12855            payload_buf[0..avail_len].copy_from_slice(__input);
12856            Bytes::new(&payload_buf)
12857        } else {
12858            Bytes::new(__input)
12859        };
12860        let mut __struct = Self::default();
12861        let tmp = buf.get_u32_le();
12862        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12863            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12864                flag_type: "GimbalManagerFlags",
12865                value: tmp as u32,
12866            })?;
12867        for v in &mut __struct.q {
12868            let val = buf.get_f32_le();
12869            *v = val;
12870        }
12871        __struct.angular_velocity_x = buf.get_f32_le();
12872        __struct.angular_velocity_y = buf.get_f32_le();
12873        __struct.angular_velocity_z = buf.get_f32_le();
12874        __struct.target_system = buf.get_u8();
12875        __struct.target_component = buf.get_u8();
12876        __struct.gimbal_device_id = buf.get_u8();
12877        Ok(__struct)
12878    }
12879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12880        let mut __tmp = BytesMut::new(bytes);
12881        #[allow(clippy::absurd_extreme_comparisons)]
12882        #[allow(unused_comparisons)]
12883        if __tmp.remaining() < Self::ENCODED_LEN {
12884            panic!(
12885                "buffer is too small (need {} bytes, but got {})",
12886                Self::ENCODED_LEN,
12887                __tmp.remaining(),
12888            )
12889        }
12890        __tmp.put_u32_le(self.flags.bits());
12891        for val in &self.q {
12892            __tmp.put_f32_le(*val);
12893        }
12894        __tmp.put_f32_le(self.angular_velocity_x);
12895        __tmp.put_f32_le(self.angular_velocity_y);
12896        __tmp.put_f32_le(self.angular_velocity_z);
12897        __tmp.put_u8(self.target_system);
12898        __tmp.put_u8(self.target_component);
12899        __tmp.put_u8(self.gimbal_device_id);
12900        if matches!(version, MavlinkVersion::V2) {
12901            let len = __tmp.len();
12902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12903        } else {
12904            __tmp.len()
12905        }
12906    }
12907}
12908#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12909#[doc = ""]
12910#[doc = "ID: 288"]
12911#[derive(Debug, Clone, PartialEq)]
12912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12914#[cfg_attr(feature = "ts", derive(TS))]
12915#[cfg_attr(feature = "ts", ts(export))]
12916pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12917    #[doc = "High level gimbal manager flags."]
12918    pub flags: GimbalManagerFlags,
12919    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12920    pub pitch: f32,
12921    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12922    pub yaw: f32,
12923    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12924    pub pitch_rate: f32,
12925    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12926    pub yaw_rate: f32,
12927    #[doc = "System ID"]
12928    pub target_system: u8,
12929    #[doc = "Component ID"]
12930    pub target_component: u8,
12931    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12932    pub gimbal_device_id: u8,
12933}
12934impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12935    pub const ENCODED_LEN: usize = 23usize;
12936    pub const DEFAULT: Self = Self {
12937        flags: GimbalManagerFlags::DEFAULT,
12938        pitch: 0.0_f32,
12939        yaw: 0.0_f32,
12940        pitch_rate: 0.0_f32,
12941        yaw_rate: 0.0_f32,
12942        target_system: 0_u8,
12943        target_component: 0_u8,
12944        gimbal_device_id: 0_u8,
12945    };
12946    #[cfg(feature = "arbitrary")]
12947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12948        use arbitrary::{Arbitrary, Unstructured};
12949        let mut buf = [0u8; 1024];
12950        rng.fill_bytes(&mut buf);
12951        let mut unstructured = Unstructured::new(&buf);
12952        Self::arbitrary(&mut unstructured).unwrap_or_default()
12953    }
12954}
12955impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12956    fn default() -> Self {
12957        Self::DEFAULT.clone()
12958    }
12959}
12960impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12961    type Message = MavMessage;
12962    const ID: u32 = 288u32;
12963    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12964    const EXTRA_CRC: u8 = 20u8;
12965    const ENCODED_LEN: usize = 23usize;
12966    fn deser(
12967        _version: MavlinkVersion,
12968        __input: &[u8],
12969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12970        let avail_len = __input.len();
12971        let mut payload_buf = [0; Self::ENCODED_LEN];
12972        let mut buf = if avail_len < Self::ENCODED_LEN {
12973            payload_buf[0..avail_len].copy_from_slice(__input);
12974            Bytes::new(&payload_buf)
12975        } else {
12976            Bytes::new(__input)
12977        };
12978        let mut __struct = Self::default();
12979        let tmp = buf.get_u32_le();
12980        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12981            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12982                flag_type: "GimbalManagerFlags",
12983                value: tmp as u32,
12984            })?;
12985        __struct.pitch = buf.get_f32_le();
12986        __struct.yaw = buf.get_f32_le();
12987        __struct.pitch_rate = buf.get_f32_le();
12988        __struct.yaw_rate = buf.get_f32_le();
12989        __struct.target_system = buf.get_u8();
12990        __struct.target_component = buf.get_u8();
12991        __struct.gimbal_device_id = buf.get_u8();
12992        Ok(__struct)
12993    }
12994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12995        let mut __tmp = BytesMut::new(bytes);
12996        #[allow(clippy::absurd_extreme_comparisons)]
12997        #[allow(unused_comparisons)]
12998        if __tmp.remaining() < Self::ENCODED_LEN {
12999            panic!(
13000                "buffer is too small (need {} bytes, but got {})",
13001                Self::ENCODED_LEN,
13002                __tmp.remaining(),
13003            )
13004        }
13005        __tmp.put_u32_le(self.flags.bits());
13006        __tmp.put_f32_le(self.pitch);
13007        __tmp.put_f32_le(self.yaw);
13008        __tmp.put_f32_le(self.pitch_rate);
13009        __tmp.put_f32_le(self.yaw_rate);
13010        __tmp.put_u8(self.target_system);
13011        __tmp.put_u8(self.target_component);
13012        __tmp.put_u8(self.gimbal_device_id);
13013        if matches!(version, MavlinkVersion::V2) {
13014            let len = __tmp.len();
13015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13016        } else {
13017            __tmp.len()
13018        }
13019    }
13020}
13021#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13022#[doc = ""]
13023#[doc = "ID: 287"]
13024#[derive(Debug, Clone, PartialEq)]
13025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13027#[cfg_attr(feature = "ts", derive(TS))]
13028#[cfg_attr(feature = "ts", ts(export))]
13029pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13030    #[doc = "High level gimbal manager flags to use."]
13031    pub flags: GimbalManagerFlags,
13032    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13033    pub pitch: f32,
13034    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13035    pub yaw: f32,
13036    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13037    pub pitch_rate: f32,
13038    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13039    pub yaw_rate: f32,
13040    #[doc = "System ID"]
13041    pub target_system: u8,
13042    #[doc = "Component ID"]
13043    pub target_component: u8,
13044    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13045    pub gimbal_device_id: u8,
13046}
13047impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13048    pub const ENCODED_LEN: usize = 23usize;
13049    pub const DEFAULT: Self = Self {
13050        flags: GimbalManagerFlags::DEFAULT,
13051        pitch: 0.0_f32,
13052        yaw: 0.0_f32,
13053        pitch_rate: 0.0_f32,
13054        yaw_rate: 0.0_f32,
13055        target_system: 0_u8,
13056        target_component: 0_u8,
13057        gimbal_device_id: 0_u8,
13058    };
13059    #[cfg(feature = "arbitrary")]
13060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13061        use arbitrary::{Arbitrary, Unstructured};
13062        let mut buf = [0u8; 1024];
13063        rng.fill_bytes(&mut buf);
13064        let mut unstructured = Unstructured::new(&buf);
13065        Self::arbitrary(&mut unstructured).unwrap_or_default()
13066    }
13067}
13068impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13069    fn default() -> Self {
13070        Self::DEFAULT.clone()
13071    }
13072}
13073impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13074    type Message = MavMessage;
13075    const ID: u32 = 287u32;
13076    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13077    const EXTRA_CRC: u8 = 1u8;
13078    const ENCODED_LEN: usize = 23usize;
13079    fn deser(
13080        _version: MavlinkVersion,
13081        __input: &[u8],
13082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13083        let avail_len = __input.len();
13084        let mut payload_buf = [0; Self::ENCODED_LEN];
13085        let mut buf = if avail_len < Self::ENCODED_LEN {
13086            payload_buf[0..avail_len].copy_from_slice(__input);
13087            Bytes::new(&payload_buf)
13088        } else {
13089            Bytes::new(__input)
13090        };
13091        let mut __struct = Self::default();
13092        let tmp = buf.get_u32_le();
13093        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13094            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13095                flag_type: "GimbalManagerFlags",
13096                value: tmp as u32,
13097            })?;
13098        __struct.pitch = buf.get_f32_le();
13099        __struct.yaw = buf.get_f32_le();
13100        __struct.pitch_rate = buf.get_f32_le();
13101        __struct.yaw_rate = buf.get_f32_le();
13102        __struct.target_system = buf.get_u8();
13103        __struct.target_component = buf.get_u8();
13104        __struct.gimbal_device_id = buf.get_u8();
13105        Ok(__struct)
13106    }
13107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13108        let mut __tmp = BytesMut::new(bytes);
13109        #[allow(clippy::absurd_extreme_comparisons)]
13110        #[allow(unused_comparisons)]
13111        if __tmp.remaining() < Self::ENCODED_LEN {
13112            panic!(
13113                "buffer is too small (need {} bytes, but got {})",
13114                Self::ENCODED_LEN,
13115                __tmp.remaining(),
13116            )
13117        }
13118        __tmp.put_u32_le(self.flags.bits());
13119        __tmp.put_f32_le(self.pitch);
13120        __tmp.put_f32_le(self.yaw);
13121        __tmp.put_f32_le(self.pitch_rate);
13122        __tmp.put_f32_le(self.yaw_rate);
13123        __tmp.put_u8(self.target_system);
13124        __tmp.put_u8(self.target_component);
13125        __tmp.put_u8(self.gimbal_device_id);
13126        if matches!(version, MavlinkVersion::V2) {
13127            let len = __tmp.len();
13128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13129        } else {
13130            __tmp.len()
13131        }
13132    }
13133}
13134#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13135#[doc = ""]
13136#[doc = "ID: 281"]
13137#[derive(Debug, Clone, PartialEq)]
13138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13140#[cfg_attr(feature = "ts", derive(TS))]
13141#[cfg_attr(feature = "ts", ts(export))]
13142pub struct GIMBAL_MANAGER_STATUS_DATA {
13143    #[doc = "Timestamp (time since system boot)."]
13144    pub time_boot_ms: u32,
13145    #[doc = "High level gimbal manager flags currently applied."]
13146    pub flags: GimbalManagerFlags,
13147    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13148    pub gimbal_device_id: u8,
13149    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13150    pub primary_control_sysid: u8,
13151    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13152    pub primary_control_compid: u8,
13153    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13154    pub secondary_control_sysid: u8,
13155    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13156    pub secondary_control_compid: u8,
13157}
13158impl GIMBAL_MANAGER_STATUS_DATA {
13159    pub const ENCODED_LEN: usize = 13usize;
13160    pub const DEFAULT: Self = Self {
13161        time_boot_ms: 0_u32,
13162        flags: GimbalManagerFlags::DEFAULT,
13163        gimbal_device_id: 0_u8,
13164        primary_control_sysid: 0_u8,
13165        primary_control_compid: 0_u8,
13166        secondary_control_sysid: 0_u8,
13167        secondary_control_compid: 0_u8,
13168    };
13169    #[cfg(feature = "arbitrary")]
13170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13171        use arbitrary::{Arbitrary, Unstructured};
13172        let mut buf = [0u8; 1024];
13173        rng.fill_bytes(&mut buf);
13174        let mut unstructured = Unstructured::new(&buf);
13175        Self::arbitrary(&mut unstructured).unwrap_or_default()
13176    }
13177}
13178impl Default for GIMBAL_MANAGER_STATUS_DATA {
13179    fn default() -> Self {
13180        Self::DEFAULT.clone()
13181    }
13182}
13183impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13184    type Message = MavMessage;
13185    const ID: u32 = 281u32;
13186    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13187    const EXTRA_CRC: u8 = 48u8;
13188    const ENCODED_LEN: usize = 13usize;
13189    fn deser(
13190        _version: MavlinkVersion,
13191        __input: &[u8],
13192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13193        let avail_len = __input.len();
13194        let mut payload_buf = [0; Self::ENCODED_LEN];
13195        let mut buf = if avail_len < Self::ENCODED_LEN {
13196            payload_buf[0..avail_len].copy_from_slice(__input);
13197            Bytes::new(&payload_buf)
13198        } else {
13199            Bytes::new(__input)
13200        };
13201        let mut __struct = Self::default();
13202        __struct.time_boot_ms = buf.get_u32_le();
13203        let tmp = buf.get_u32_le();
13204        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13205            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13206                flag_type: "GimbalManagerFlags",
13207                value: tmp as u32,
13208            })?;
13209        __struct.gimbal_device_id = buf.get_u8();
13210        __struct.primary_control_sysid = buf.get_u8();
13211        __struct.primary_control_compid = buf.get_u8();
13212        __struct.secondary_control_sysid = buf.get_u8();
13213        __struct.secondary_control_compid = buf.get_u8();
13214        Ok(__struct)
13215    }
13216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13217        let mut __tmp = BytesMut::new(bytes);
13218        #[allow(clippy::absurd_extreme_comparisons)]
13219        #[allow(unused_comparisons)]
13220        if __tmp.remaining() < Self::ENCODED_LEN {
13221            panic!(
13222                "buffer is too small (need {} bytes, but got {})",
13223                Self::ENCODED_LEN,
13224                __tmp.remaining(),
13225            )
13226        }
13227        __tmp.put_u32_le(self.time_boot_ms);
13228        __tmp.put_u32_le(self.flags.bits());
13229        __tmp.put_u8(self.gimbal_device_id);
13230        __tmp.put_u8(self.primary_control_sysid);
13231        __tmp.put_u8(self.primary_control_compid);
13232        __tmp.put_u8(self.secondary_control_sysid);
13233        __tmp.put_u8(self.secondary_control_compid);
13234        if matches!(version, MavlinkVersion::V2) {
13235            let len = __tmp.len();
13236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13237        } else {
13238            __tmp.len()
13239        }
13240    }
13241}
13242#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13243#[doc = ""]
13244#[doc = "ID: 33"]
13245#[derive(Debug, Clone, PartialEq)]
13246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13248#[cfg_attr(feature = "ts", derive(TS))]
13249#[cfg_attr(feature = "ts", ts(export))]
13250pub struct GLOBAL_POSITION_INT_DATA {
13251    #[doc = "Timestamp (time since system boot)."]
13252    pub time_boot_ms: u32,
13253    #[doc = "Latitude, expressed"]
13254    pub lat: i32,
13255    #[doc = "Longitude, expressed"]
13256    pub lon: i32,
13257    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13258    pub alt: i32,
13259    #[doc = "Altitude above home"]
13260    pub relative_alt: i32,
13261    #[doc = "Ground X Speed (Latitude, positive north)"]
13262    pub vx: i16,
13263    #[doc = "Ground Y Speed (Longitude, positive east)"]
13264    pub vy: i16,
13265    #[doc = "Ground Z Speed (Altitude, positive down)"]
13266    pub vz: i16,
13267    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13268    pub hdg: u16,
13269}
13270impl GLOBAL_POSITION_INT_DATA {
13271    pub const ENCODED_LEN: usize = 28usize;
13272    pub const DEFAULT: Self = Self {
13273        time_boot_ms: 0_u32,
13274        lat: 0_i32,
13275        lon: 0_i32,
13276        alt: 0_i32,
13277        relative_alt: 0_i32,
13278        vx: 0_i16,
13279        vy: 0_i16,
13280        vz: 0_i16,
13281        hdg: 0_u16,
13282    };
13283    #[cfg(feature = "arbitrary")]
13284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13285        use arbitrary::{Arbitrary, Unstructured};
13286        let mut buf = [0u8; 1024];
13287        rng.fill_bytes(&mut buf);
13288        let mut unstructured = Unstructured::new(&buf);
13289        Self::arbitrary(&mut unstructured).unwrap_or_default()
13290    }
13291}
13292impl Default for GLOBAL_POSITION_INT_DATA {
13293    fn default() -> Self {
13294        Self::DEFAULT.clone()
13295    }
13296}
13297impl MessageData for GLOBAL_POSITION_INT_DATA {
13298    type Message = MavMessage;
13299    const ID: u32 = 33u32;
13300    const NAME: &'static str = "GLOBAL_POSITION_INT";
13301    const EXTRA_CRC: u8 = 104u8;
13302    const ENCODED_LEN: usize = 28usize;
13303    fn deser(
13304        _version: MavlinkVersion,
13305        __input: &[u8],
13306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13307        let avail_len = __input.len();
13308        let mut payload_buf = [0; Self::ENCODED_LEN];
13309        let mut buf = if avail_len < Self::ENCODED_LEN {
13310            payload_buf[0..avail_len].copy_from_slice(__input);
13311            Bytes::new(&payload_buf)
13312        } else {
13313            Bytes::new(__input)
13314        };
13315        let mut __struct = Self::default();
13316        __struct.time_boot_ms = buf.get_u32_le();
13317        __struct.lat = buf.get_i32_le();
13318        __struct.lon = buf.get_i32_le();
13319        __struct.alt = buf.get_i32_le();
13320        __struct.relative_alt = buf.get_i32_le();
13321        __struct.vx = buf.get_i16_le();
13322        __struct.vy = buf.get_i16_le();
13323        __struct.vz = buf.get_i16_le();
13324        __struct.hdg = buf.get_u16_le();
13325        Ok(__struct)
13326    }
13327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13328        let mut __tmp = BytesMut::new(bytes);
13329        #[allow(clippy::absurd_extreme_comparisons)]
13330        #[allow(unused_comparisons)]
13331        if __tmp.remaining() < Self::ENCODED_LEN {
13332            panic!(
13333                "buffer is too small (need {} bytes, but got {})",
13334                Self::ENCODED_LEN,
13335                __tmp.remaining(),
13336            )
13337        }
13338        __tmp.put_u32_le(self.time_boot_ms);
13339        __tmp.put_i32_le(self.lat);
13340        __tmp.put_i32_le(self.lon);
13341        __tmp.put_i32_le(self.alt);
13342        __tmp.put_i32_le(self.relative_alt);
13343        __tmp.put_i16_le(self.vx);
13344        __tmp.put_i16_le(self.vy);
13345        __tmp.put_i16_le(self.vz);
13346        __tmp.put_u16_le(self.hdg);
13347        if matches!(version, MavlinkVersion::V2) {
13348            let len = __tmp.len();
13349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13350        } else {
13351            __tmp.len()
13352        }
13353    }
13354}
13355#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13356#[doc = ""]
13357#[doc = "ID: 63"]
13358#[derive(Debug, Clone, PartialEq)]
13359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13361#[cfg_attr(feature = "ts", derive(TS))]
13362#[cfg_attr(feature = "ts", ts(export))]
13363pub struct GLOBAL_POSITION_INT_COV_DATA {
13364    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13365    pub time_usec: u64,
13366    #[doc = "Latitude"]
13367    pub lat: i32,
13368    #[doc = "Longitude"]
13369    pub lon: i32,
13370    #[doc = "Altitude in meters above MSL"]
13371    pub alt: i32,
13372    #[doc = "Altitude above ground"]
13373    pub relative_alt: i32,
13374    #[doc = "Ground X Speed (Latitude)"]
13375    pub vx: f32,
13376    #[doc = "Ground Y Speed (Longitude)"]
13377    pub vy: f32,
13378    #[doc = "Ground Z Speed (Altitude)"]
13379    pub vz: f32,
13380    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13381    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13382    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13383    pub covariance: [f32; 36],
13384    #[doc = "Class id of the estimator this estimate originated from."]
13385    pub estimator_type: MavEstimatorType,
13386}
13387impl GLOBAL_POSITION_INT_COV_DATA {
13388    pub const ENCODED_LEN: usize = 181usize;
13389    pub const DEFAULT: Self = Self {
13390        time_usec: 0_u64,
13391        lat: 0_i32,
13392        lon: 0_i32,
13393        alt: 0_i32,
13394        relative_alt: 0_i32,
13395        vx: 0.0_f32,
13396        vy: 0.0_f32,
13397        vz: 0.0_f32,
13398        covariance: [0.0_f32; 36usize],
13399        estimator_type: MavEstimatorType::DEFAULT,
13400    };
13401    #[cfg(feature = "arbitrary")]
13402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13403        use arbitrary::{Arbitrary, Unstructured};
13404        let mut buf = [0u8; 1024];
13405        rng.fill_bytes(&mut buf);
13406        let mut unstructured = Unstructured::new(&buf);
13407        Self::arbitrary(&mut unstructured).unwrap_or_default()
13408    }
13409}
13410impl Default for GLOBAL_POSITION_INT_COV_DATA {
13411    fn default() -> Self {
13412        Self::DEFAULT.clone()
13413    }
13414}
13415impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13416    type Message = MavMessage;
13417    const ID: u32 = 63u32;
13418    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13419    const EXTRA_CRC: u8 = 119u8;
13420    const ENCODED_LEN: usize = 181usize;
13421    fn deser(
13422        _version: MavlinkVersion,
13423        __input: &[u8],
13424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13425        let avail_len = __input.len();
13426        let mut payload_buf = [0; Self::ENCODED_LEN];
13427        let mut buf = if avail_len < Self::ENCODED_LEN {
13428            payload_buf[0..avail_len].copy_from_slice(__input);
13429            Bytes::new(&payload_buf)
13430        } else {
13431            Bytes::new(__input)
13432        };
13433        let mut __struct = Self::default();
13434        __struct.time_usec = buf.get_u64_le();
13435        __struct.lat = buf.get_i32_le();
13436        __struct.lon = buf.get_i32_le();
13437        __struct.alt = buf.get_i32_le();
13438        __struct.relative_alt = buf.get_i32_le();
13439        __struct.vx = buf.get_f32_le();
13440        __struct.vy = buf.get_f32_le();
13441        __struct.vz = buf.get_f32_le();
13442        for v in &mut __struct.covariance {
13443            let val = buf.get_f32_le();
13444            *v = val;
13445        }
13446        let tmp = buf.get_u8();
13447        __struct.estimator_type =
13448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13449                enum_type: "MavEstimatorType",
13450                value: tmp as u32,
13451            })?;
13452        Ok(__struct)
13453    }
13454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13455        let mut __tmp = BytesMut::new(bytes);
13456        #[allow(clippy::absurd_extreme_comparisons)]
13457        #[allow(unused_comparisons)]
13458        if __tmp.remaining() < Self::ENCODED_LEN {
13459            panic!(
13460                "buffer is too small (need {} bytes, but got {})",
13461                Self::ENCODED_LEN,
13462                __tmp.remaining(),
13463            )
13464        }
13465        __tmp.put_u64_le(self.time_usec);
13466        __tmp.put_i32_le(self.lat);
13467        __tmp.put_i32_le(self.lon);
13468        __tmp.put_i32_le(self.alt);
13469        __tmp.put_i32_le(self.relative_alt);
13470        __tmp.put_f32_le(self.vx);
13471        __tmp.put_f32_le(self.vy);
13472        __tmp.put_f32_le(self.vz);
13473        for val in &self.covariance {
13474            __tmp.put_f32_le(*val);
13475        }
13476        __tmp.put_u8(self.estimator_type as u8);
13477        if matches!(version, MavlinkVersion::V2) {
13478            let len = __tmp.len();
13479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13480        } else {
13481            __tmp.len()
13482        }
13483    }
13484}
13485#[doc = "Global position/attitude estimate from a vision source."]
13486#[doc = ""]
13487#[doc = "ID: 101"]
13488#[derive(Debug, Clone, PartialEq)]
13489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13491#[cfg_attr(feature = "ts", derive(TS))]
13492#[cfg_attr(feature = "ts", ts(export))]
13493pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13494    #[doc = "Timestamp (UNIX time or since system boot)"]
13495    pub usec: u64,
13496    #[doc = "Global X position"]
13497    pub x: f32,
13498    #[doc = "Global Y position"]
13499    pub y: f32,
13500    #[doc = "Global Z position"]
13501    pub z: f32,
13502    #[doc = "Roll angle"]
13503    pub roll: f32,
13504    #[doc = "Pitch angle"]
13505    pub pitch: f32,
13506    #[doc = "Yaw angle"]
13507    pub yaw: f32,
13508    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13512    pub covariance: [f32; 21],
13513    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13514    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13515    pub reset_counter: u8,
13516}
13517impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13518    pub const ENCODED_LEN: usize = 117usize;
13519    pub const DEFAULT: Self = Self {
13520        usec: 0_u64,
13521        x: 0.0_f32,
13522        y: 0.0_f32,
13523        z: 0.0_f32,
13524        roll: 0.0_f32,
13525        pitch: 0.0_f32,
13526        yaw: 0.0_f32,
13527        covariance: [0.0_f32; 21usize],
13528        reset_counter: 0_u8,
13529    };
13530    #[cfg(feature = "arbitrary")]
13531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13532        use arbitrary::{Arbitrary, Unstructured};
13533        let mut buf = [0u8; 1024];
13534        rng.fill_bytes(&mut buf);
13535        let mut unstructured = Unstructured::new(&buf);
13536        Self::arbitrary(&mut unstructured).unwrap_or_default()
13537    }
13538}
13539impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13540    fn default() -> Self {
13541        Self::DEFAULT.clone()
13542    }
13543}
13544impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13545    type Message = MavMessage;
13546    const ID: u32 = 101u32;
13547    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13548    const EXTRA_CRC: u8 = 102u8;
13549    const ENCODED_LEN: usize = 117usize;
13550    fn deser(
13551        _version: MavlinkVersion,
13552        __input: &[u8],
13553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13554        let avail_len = __input.len();
13555        let mut payload_buf = [0; Self::ENCODED_LEN];
13556        let mut buf = if avail_len < Self::ENCODED_LEN {
13557            payload_buf[0..avail_len].copy_from_slice(__input);
13558            Bytes::new(&payload_buf)
13559        } else {
13560            Bytes::new(__input)
13561        };
13562        let mut __struct = Self::default();
13563        __struct.usec = buf.get_u64_le();
13564        __struct.x = buf.get_f32_le();
13565        __struct.y = buf.get_f32_le();
13566        __struct.z = buf.get_f32_le();
13567        __struct.roll = buf.get_f32_le();
13568        __struct.pitch = buf.get_f32_le();
13569        __struct.yaw = buf.get_f32_le();
13570        for v in &mut __struct.covariance {
13571            let val = buf.get_f32_le();
13572            *v = val;
13573        }
13574        __struct.reset_counter = buf.get_u8();
13575        Ok(__struct)
13576    }
13577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13578        let mut __tmp = BytesMut::new(bytes);
13579        #[allow(clippy::absurd_extreme_comparisons)]
13580        #[allow(unused_comparisons)]
13581        if __tmp.remaining() < Self::ENCODED_LEN {
13582            panic!(
13583                "buffer is too small (need {} bytes, but got {})",
13584                Self::ENCODED_LEN,
13585                __tmp.remaining(),
13586            )
13587        }
13588        __tmp.put_u64_le(self.usec);
13589        __tmp.put_f32_le(self.x);
13590        __tmp.put_f32_le(self.y);
13591        __tmp.put_f32_le(self.z);
13592        __tmp.put_f32_le(self.roll);
13593        __tmp.put_f32_le(self.pitch);
13594        __tmp.put_f32_le(self.yaw);
13595        if matches!(version, MavlinkVersion::V2) {
13596            for val in &self.covariance {
13597                __tmp.put_f32_le(*val);
13598            }
13599            __tmp.put_u8(self.reset_counter);
13600            let len = __tmp.len();
13601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13602        } else {
13603            __tmp.len()
13604        }
13605    }
13606}
13607#[doc = "Second GPS data."]
13608#[doc = ""]
13609#[doc = "ID: 124"]
13610#[derive(Debug, Clone, PartialEq)]
13611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13613#[cfg_attr(feature = "ts", derive(TS))]
13614#[cfg_attr(feature = "ts", ts(export))]
13615pub struct GPS2_RAW_DATA {
13616    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13617    pub time_usec: u64,
13618    #[doc = "Latitude (WGS84)"]
13619    pub lat: i32,
13620    #[doc = "Longitude (WGS84)"]
13621    pub lon: i32,
13622    #[doc = "Altitude (MSL). Positive for up."]
13623    pub alt: i32,
13624    #[doc = "Age of DGPS info"]
13625    pub dgps_age: u32,
13626    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13627    pub eph: u16,
13628    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13629    pub epv: u16,
13630    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13631    pub vel: u16,
13632    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13633    pub cog: u16,
13634    #[doc = "GPS fix type."]
13635    pub fix_type: GpsFixType,
13636    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13637    pub satellites_visible: u8,
13638    #[doc = "Number of DGPS satellites"]
13639    pub dgps_numch: u8,
13640    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13642    pub yaw: u16,
13643    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13645    pub alt_ellipsoid: i32,
13646    #[doc = "Position uncertainty."]
13647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13648    pub h_acc: u32,
13649    #[doc = "Altitude uncertainty."]
13650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13651    pub v_acc: u32,
13652    #[doc = "Speed uncertainty."]
13653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13654    pub vel_acc: u32,
13655    #[doc = "Heading / track uncertainty"]
13656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13657    pub hdg_acc: u32,
13658}
13659impl GPS2_RAW_DATA {
13660    pub const ENCODED_LEN: usize = 57usize;
13661    pub const DEFAULT: Self = Self {
13662        time_usec: 0_u64,
13663        lat: 0_i32,
13664        lon: 0_i32,
13665        alt: 0_i32,
13666        dgps_age: 0_u32,
13667        eph: 0_u16,
13668        epv: 0_u16,
13669        vel: 0_u16,
13670        cog: 0_u16,
13671        fix_type: GpsFixType::DEFAULT,
13672        satellites_visible: 0_u8,
13673        dgps_numch: 0_u8,
13674        yaw: 0_u16,
13675        alt_ellipsoid: 0_i32,
13676        h_acc: 0_u32,
13677        v_acc: 0_u32,
13678        vel_acc: 0_u32,
13679        hdg_acc: 0_u32,
13680    };
13681    #[cfg(feature = "arbitrary")]
13682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13683        use arbitrary::{Arbitrary, Unstructured};
13684        let mut buf = [0u8; 1024];
13685        rng.fill_bytes(&mut buf);
13686        let mut unstructured = Unstructured::new(&buf);
13687        Self::arbitrary(&mut unstructured).unwrap_or_default()
13688    }
13689}
13690impl Default for GPS2_RAW_DATA {
13691    fn default() -> Self {
13692        Self::DEFAULT.clone()
13693    }
13694}
13695impl MessageData for GPS2_RAW_DATA {
13696    type Message = MavMessage;
13697    const ID: u32 = 124u32;
13698    const NAME: &'static str = "GPS2_RAW";
13699    const EXTRA_CRC: u8 = 87u8;
13700    const ENCODED_LEN: usize = 57usize;
13701    fn deser(
13702        _version: MavlinkVersion,
13703        __input: &[u8],
13704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13705        let avail_len = __input.len();
13706        let mut payload_buf = [0; Self::ENCODED_LEN];
13707        let mut buf = if avail_len < Self::ENCODED_LEN {
13708            payload_buf[0..avail_len].copy_from_slice(__input);
13709            Bytes::new(&payload_buf)
13710        } else {
13711            Bytes::new(__input)
13712        };
13713        let mut __struct = Self::default();
13714        __struct.time_usec = buf.get_u64_le();
13715        __struct.lat = buf.get_i32_le();
13716        __struct.lon = buf.get_i32_le();
13717        __struct.alt = buf.get_i32_le();
13718        __struct.dgps_age = buf.get_u32_le();
13719        __struct.eph = buf.get_u16_le();
13720        __struct.epv = buf.get_u16_le();
13721        __struct.vel = buf.get_u16_le();
13722        __struct.cog = buf.get_u16_le();
13723        let tmp = buf.get_u8();
13724        __struct.fix_type =
13725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13726                enum_type: "GpsFixType",
13727                value: tmp as u32,
13728            })?;
13729        __struct.satellites_visible = buf.get_u8();
13730        __struct.dgps_numch = buf.get_u8();
13731        __struct.yaw = buf.get_u16_le();
13732        __struct.alt_ellipsoid = buf.get_i32_le();
13733        __struct.h_acc = buf.get_u32_le();
13734        __struct.v_acc = buf.get_u32_le();
13735        __struct.vel_acc = buf.get_u32_le();
13736        __struct.hdg_acc = buf.get_u32_le();
13737        Ok(__struct)
13738    }
13739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13740        let mut __tmp = BytesMut::new(bytes);
13741        #[allow(clippy::absurd_extreme_comparisons)]
13742        #[allow(unused_comparisons)]
13743        if __tmp.remaining() < Self::ENCODED_LEN {
13744            panic!(
13745                "buffer is too small (need {} bytes, but got {})",
13746                Self::ENCODED_LEN,
13747                __tmp.remaining(),
13748            )
13749        }
13750        __tmp.put_u64_le(self.time_usec);
13751        __tmp.put_i32_le(self.lat);
13752        __tmp.put_i32_le(self.lon);
13753        __tmp.put_i32_le(self.alt);
13754        __tmp.put_u32_le(self.dgps_age);
13755        __tmp.put_u16_le(self.eph);
13756        __tmp.put_u16_le(self.epv);
13757        __tmp.put_u16_le(self.vel);
13758        __tmp.put_u16_le(self.cog);
13759        __tmp.put_u8(self.fix_type as u8);
13760        __tmp.put_u8(self.satellites_visible);
13761        __tmp.put_u8(self.dgps_numch);
13762        if matches!(version, MavlinkVersion::V2) {
13763            __tmp.put_u16_le(self.yaw);
13764            __tmp.put_i32_le(self.alt_ellipsoid);
13765            __tmp.put_u32_le(self.h_acc);
13766            __tmp.put_u32_le(self.v_acc);
13767            __tmp.put_u32_le(self.vel_acc);
13768            __tmp.put_u32_le(self.hdg_acc);
13769            let len = __tmp.len();
13770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13771        } else {
13772            __tmp.len()
13773        }
13774    }
13775}
13776#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13777#[doc = ""]
13778#[doc = "ID: 128"]
13779#[derive(Debug, Clone, PartialEq)]
13780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13782#[cfg_attr(feature = "ts", derive(TS))]
13783#[cfg_attr(feature = "ts", ts(export))]
13784pub struct GPS2_RTK_DATA {
13785    #[doc = "Time since boot of last baseline message received."]
13786    pub time_last_baseline_ms: u32,
13787    #[doc = "GPS Time of Week of last baseline"]
13788    pub tow: u32,
13789    #[doc = "Current baseline in ECEF x or NED north component."]
13790    pub baseline_a_mm: i32,
13791    #[doc = "Current baseline in ECEF y or NED east component."]
13792    pub baseline_b_mm: i32,
13793    #[doc = "Current baseline in ECEF z or NED down component."]
13794    pub baseline_c_mm: i32,
13795    #[doc = "Current estimate of baseline accuracy."]
13796    pub accuracy: u32,
13797    #[doc = "Current number of integer ambiguity hypotheses."]
13798    pub iar_num_hypotheses: i32,
13799    #[doc = "GPS Week Number of last baseline"]
13800    pub wn: u16,
13801    #[doc = "Identification of connected RTK receiver."]
13802    pub rtk_receiver_id: u8,
13803    #[doc = "GPS-specific health report for RTK data."]
13804    pub rtk_health: u8,
13805    #[doc = "Rate of baseline messages being received by GPS"]
13806    pub rtk_rate: u8,
13807    #[doc = "Current number of sats used for RTK calculation."]
13808    pub nsats: u8,
13809    #[doc = "Coordinate system of baseline"]
13810    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13811}
13812impl GPS2_RTK_DATA {
13813    pub const ENCODED_LEN: usize = 35usize;
13814    pub const DEFAULT: Self = Self {
13815        time_last_baseline_ms: 0_u32,
13816        tow: 0_u32,
13817        baseline_a_mm: 0_i32,
13818        baseline_b_mm: 0_i32,
13819        baseline_c_mm: 0_i32,
13820        accuracy: 0_u32,
13821        iar_num_hypotheses: 0_i32,
13822        wn: 0_u16,
13823        rtk_receiver_id: 0_u8,
13824        rtk_health: 0_u8,
13825        rtk_rate: 0_u8,
13826        nsats: 0_u8,
13827        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13828    };
13829    #[cfg(feature = "arbitrary")]
13830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13831        use arbitrary::{Arbitrary, Unstructured};
13832        let mut buf = [0u8; 1024];
13833        rng.fill_bytes(&mut buf);
13834        let mut unstructured = Unstructured::new(&buf);
13835        Self::arbitrary(&mut unstructured).unwrap_or_default()
13836    }
13837}
13838impl Default for GPS2_RTK_DATA {
13839    fn default() -> Self {
13840        Self::DEFAULT.clone()
13841    }
13842}
13843impl MessageData for GPS2_RTK_DATA {
13844    type Message = MavMessage;
13845    const ID: u32 = 128u32;
13846    const NAME: &'static str = "GPS2_RTK";
13847    const EXTRA_CRC: u8 = 226u8;
13848    const ENCODED_LEN: usize = 35usize;
13849    fn deser(
13850        _version: MavlinkVersion,
13851        __input: &[u8],
13852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13853        let avail_len = __input.len();
13854        let mut payload_buf = [0; Self::ENCODED_LEN];
13855        let mut buf = if avail_len < Self::ENCODED_LEN {
13856            payload_buf[0..avail_len].copy_from_slice(__input);
13857            Bytes::new(&payload_buf)
13858        } else {
13859            Bytes::new(__input)
13860        };
13861        let mut __struct = Self::default();
13862        __struct.time_last_baseline_ms = buf.get_u32_le();
13863        __struct.tow = buf.get_u32_le();
13864        __struct.baseline_a_mm = buf.get_i32_le();
13865        __struct.baseline_b_mm = buf.get_i32_le();
13866        __struct.baseline_c_mm = buf.get_i32_le();
13867        __struct.accuracy = buf.get_u32_le();
13868        __struct.iar_num_hypotheses = buf.get_i32_le();
13869        __struct.wn = buf.get_u16_le();
13870        __struct.rtk_receiver_id = buf.get_u8();
13871        __struct.rtk_health = buf.get_u8();
13872        __struct.rtk_rate = buf.get_u8();
13873        __struct.nsats = buf.get_u8();
13874        let tmp = buf.get_u8();
13875        __struct.baseline_coords_type =
13876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13877                enum_type: "RtkBaselineCoordinateSystem",
13878                value: tmp as u32,
13879            })?;
13880        Ok(__struct)
13881    }
13882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13883        let mut __tmp = BytesMut::new(bytes);
13884        #[allow(clippy::absurd_extreme_comparisons)]
13885        #[allow(unused_comparisons)]
13886        if __tmp.remaining() < Self::ENCODED_LEN {
13887            panic!(
13888                "buffer is too small (need {} bytes, but got {})",
13889                Self::ENCODED_LEN,
13890                __tmp.remaining(),
13891            )
13892        }
13893        __tmp.put_u32_le(self.time_last_baseline_ms);
13894        __tmp.put_u32_le(self.tow);
13895        __tmp.put_i32_le(self.baseline_a_mm);
13896        __tmp.put_i32_le(self.baseline_b_mm);
13897        __tmp.put_i32_le(self.baseline_c_mm);
13898        __tmp.put_u32_le(self.accuracy);
13899        __tmp.put_i32_le(self.iar_num_hypotheses);
13900        __tmp.put_u16_le(self.wn);
13901        __tmp.put_u8(self.rtk_receiver_id);
13902        __tmp.put_u8(self.rtk_health);
13903        __tmp.put_u8(self.rtk_rate);
13904        __tmp.put_u8(self.nsats);
13905        __tmp.put_u8(self.baseline_coords_type as u8);
13906        if matches!(version, MavlinkVersion::V2) {
13907            let len = __tmp.len();
13908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13909        } else {
13910            __tmp.len()
13911        }
13912    }
13913}
13914#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13915#[doc = ""]
13916#[doc = "ID: 49"]
13917#[derive(Debug, Clone, PartialEq)]
13918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13920#[cfg_attr(feature = "ts", derive(TS))]
13921#[cfg_attr(feature = "ts", ts(export))]
13922pub struct GPS_GLOBAL_ORIGIN_DATA {
13923    #[doc = "Latitude (WGS84)"]
13924    pub latitude: i32,
13925    #[doc = "Longitude (WGS84)"]
13926    pub longitude: i32,
13927    #[doc = "Altitude (MSL). Positive for up."]
13928    pub altitude: i32,
13929    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13931    pub time_usec: u64,
13932}
13933impl GPS_GLOBAL_ORIGIN_DATA {
13934    pub const ENCODED_LEN: usize = 20usize;
13935    pub const DEFAULT: Self = Self {
13936        latitude: 0_i32,
13937        longitude: 0_i32,
13938        altitude: 0_i32,
13939        time_usec: 0_u64,
13940    };
13941    #[cfg(feature = "arbitrary")]
13942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13943        use arbitrary::{Arbitrary, Unstructured};
13944        let mut buf = [0u8; 1024];
13945        rng.fill_bytes(&mut buf);
13946        let mut unstructured = Unstructured::new(&buf);
13947        Self::arbitrary(&mut unstructured).unwrap_or_default()
13948    }
13949}
13950impl Default for GPS_GLOBAL_ORIGIN_DATA {
13951    fn default() -> Self {
13952        Self::DEFAULT.clone()
13953    }
13954}
13955impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13956    type Message = MavMessage;
13957    const ID: u32 = 49u32;
13958    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13959    const EXTRA_CRC: u8 = 39u8;
13960    const ENCODED_LEN: usize = 20usize;
13961    fn deser(
13962        _version: MavlinkVersion,
13963        __input: &[u8],
13964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13965        let avail_len = __input.len();
13966        let mut payload_buf = [0; Self::ENCODED_LEN];
13967        let mut buf = if avail_len < Self::ENCODED_LEN {
13968            payload_buf[0..avail_len].copy_from_slice(__input);
13969            Bytes::new(&payload_buf)
13970        } else {
13971            Bytes::new(__input)
13972        };
13973        let mut __struct = Self::default();
13974        __struct.latitude = buf.get_i32_le();
13975        __struct.longitude = buf.get_i32_le();
13976        __struct.altitude = buf.get_i32_le();
13977        __struct.time_usec = buf.get_u64_le();
13978        Ok(__struct)
13979    }
13980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13981        let mut __tmp = BytesMut::new(bytes);
13982        #[allow(clippy::absurd_extreme_comparisons)]
13983        #[allow(unused_comparisons)]
13984        if __tmp.remaining() < Self::ENCODED_LEN {
13985            panic!(
13986                "buffer is too small (need {} bytes, but got {})",
13987                Self::ENCODED_LEN,
13988                __tmp.remaining(),
13989            )
13990        }
13991        __tmp.put_i32_le(self.latitude);
13992        __tmp.put_i32_le(self.longitude);
13993        __tmp.put_i32_le(self.altitude);
13994        if matches!(version, MavlinkVersion::V2) {
13995            __tmp.put_u64_le(self.time_usec);
13996            let len = __tmp.len();
13997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13998        } else {
13999            __tmp.len()
14000        }
14001    }
14002}
14003#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14004#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14005#[doc = ""]
14006#[doc = "ID: 123"]
14007#[derive(Debug, Clone, PartialEq)]
14008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14010#[cfg_attr(feature = "ts", derive(TS))]
14011#[cfg_attr(feature = "ts", ts(export))]
14012pub struct GPS_INJECT_DATA_DATA {
14013    #[doc = "System ID"]
14014    pub target_system: u8,
14015    #[doc = "Component ID"]
14016    pub target_component: u8,
14017    #[doc = "Data length"]
14018    pub len: u8,
14019    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14020    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14021    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14022    pub data: [u8; 110],
14023}
14024impl GPS_INJECT_DATA_DATA {
14025    pub const ENCODED_LEN: usize = 113usize;
14026    pub const DEFAULT: Self = Self {
14027        target_system: 0_u8,
14028        target_component: 0_u8,
14029        len: 0_u8,
14030        data: [0_u8; 110usize],
14031    };
14032    #[cfg(feature = "arbitrary")]
14033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14034        use arbitrary::{Arbitrary, Unstructured};
14035        let mut buf = [0u8; 1024];
14036        rng.fill_bytes(&mut buf);
14037        let mut unstructured = Unstructured::new(&buf);
14038        Self::arbitrary(&mut unstructured).unwrap_or_default()
14039    }
14040}
14041impl Default for GPS_INJECT_DATA_DATA {
14042    fn default() -> Self {
14043        Self::DEFAULT.clone()
14044    }
14045}
14046impl MessageData for GPS_INJECT_DATA_DATA {
14047    type Message = MavMessage;
14048    const ID: u32 = 123u32;
14049    const NAME: &'static str = "GPS_INJECT_DATA";
14050    const EXTRA_CRC: u8 = 250u8;
14051    const ENCODED_LEN: usize = 113usize;
14052    fn deser(
14053        _version: MavlinkVersion,
14054        __input: &[u8],
14055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14056        let avail_len = __input.len();
14057        let mut payload_buf = [0; Self::ENCODED_LEN];
14058        let mut buf = if avail_len < Self::ENCODED_LEN {
14059            payload_buf[0..avail_len].copy_from_slice(__input);
14060            Bytes::new(&payload_buf)
14061        } else {
14062            Bytes::new(__input)
14063        };
14064        let mut __struct = Self::default();
14065        __struct.target_system = buf.get_u8();
14066        __struct.target_component = buf.get_u8();
14067        __struct.len = buf.get_u8();
14068        for v in &mut __struct.data {
14069            let val = buf.get_u8();
14070            *v = val;
14071        }
14072        Ok(__struct)
14073    }
14074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14075        let mut __tmp = BytesMut::new(bytes);
14076        #[allow(clippy::absurd_extreme_comparisons)]
14077        #[allow(unused_comparisons)]
14078        if __tmp.remaining() < Self::ENCODED_LEN {
14079            panic!(
14080                "buffer is too small (need {} bytes, but got {})",
14081                Self::ENCODED_LEN,
14082                __tmp.remaining(),
14083            )
14084        }
14085        __tmp.put_u8(self.target_system);
14086        __tmp.put_u8(self.target_component);
14087        __tmp.put_u8(self.len);
14088        for val in &self.data {
14089            __tmp.put_u8(*val);
14090        }
14091        if matches!(version, MavlinkVersion::V2) {
14092            let len = __tmp.len();
14093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14094        } else {
14095            __tmp.len()
14096        }
14097    }
14098}
14099#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14100#[doc = ""]
14101#[doc = "ID: 232"]
14102#[derive(Debug, Clone, PartialEq)]
14103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14105#[cfg_attr(feature = "ts", derive(TS))]
14106#[cfg_attr(feature = "ts", ts(export))]
14107pub struct GPS_INPUT_DATA {
14108    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14109    pub time_usec: u64,
14110    #[doc = "GPS time (from start of GPS week)"]
14111    pub time_week_ms: u32,
14112    #[doc = "Latitude (WGS84)"]
14113    pub lat: i32,
14114    #[doc = "Longitude (WGS84)"]
14115    pub lon: i32,
14116    #[doc = "Altitude (MSL). Positive for up."]
14117    pub alt: f32,
14118    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14119    pub hdop: f32,
14120    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14121    pub vdop: f32,
14122    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14123    pub vn: f32,
14124    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14125    pub ve: f32,
14126    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14127    pub vd: f32,
14128    #[doc = "GPS speed accuracy"]
14129    pub speed_accuracy: f32,
14130    #[doc = "GPS horizontal accuracy"]
14131    pub horiz_accuracy: f32,
14132    #[doc = "GPS vertical accuracy"]
14133    pub vert_accuracy: f32,
14134    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14135    pub ignore_flags: GpsInputIgnoreFlags,
14136    #[doc = "GPS week number"]
14137    pub time_week: u16,
14138    #[doc = "ID of the GPS for multiple GPS inputs"]
14139    pub gps_id: u8,
14140    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14141    pub fix_type: u8,
14142    #[doc = "Number of satellites visible."]
14143    pub satellites_visible: u8,
14144    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14145    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14146    pub yaw: u16,
14147}
14148impl GPS_INPUT_DATA {
14149    pub const ENCODED_LEN: usize = 65usize;
14150    pub const DEFAULT: Self = Self {
14151        time_usec: 0_u64,
14152        time_week_ms: 0_u32,
14153        lat: 0_i32,
14154        lon: 0_i32,
14155        alt: 0.0_f32,
14156        hdop: 0.0_f32,
14157        vdop: 0.0_f32,
14158        vn: 0.0_f32,
14159        ve: 0.0_f32,
14160        vd: 0.0_f32,
14161        speed_accuracy: 0.0_f32,
14162        horiz_accuracy: 0.0_f32,
14163        vert_accuracy: 0.0_f32,
14164        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14165        time_week: 0_u16,
14166        gps_id: 0_u8,
14167        fix_type: 0_u8,
14168        satellites_visible: 0_u8,
14169        yaw: 0_u16,
14170    };
14171    #[cfg(feature = "arbitrary")]
14172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14173        use arbitrary::{Arbitrary, Unstructured};
14174        let mut buf = [0u8; 1024];
14175        rng.fill_bytes(&mut buf);
14176        let mut unstructured = Unstructured::new(&buf);
14177        Self::arbitrary(&mut unstructured).unwrap_or_default()
14178    }
14179}
14180impl Default for GPS_INPUT_DATA {
14181    fn default() -> Self {
14182        Self::DEFAULT.clone()
14183    }
14184}
14185impl MessageData for GPS_INPUT_DATA {
14186    type Message = MavMessage;
14187    const ID: u32 = 232u32;
14188    const NAME: &'static str = "GPS_INPUT";
14189    const EXTRA_CRC: u8 = 151u8;
14190    const ENCODED_LEN: usize = 65usize;
14191    fn deser(
14192        _version: MavlinkVersion,
14193        __input: &[u8],
14194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14195        let avail_len = __input.len();
14196        let mut payload_buf = [0; Self::ENCODED_LEN];
14197        let mut buf = if avail_len < Self::ENCODED_LEN {
14198            payload_buf[0..avail_len].copy_from_slice(__input);
14199            Bytes::new(&payload_buf)
14200        } else {
14201            Bytes::new(__input)
14202        };
14203        let mut __struct = Self::default();
14204        __struct.time_usec = buf.get_u64_le();
14205        __struct.time_week_ms = buf.get_u32_le();
14206        __struct.lat = buf.get_i32_le();
14207        __struct.lon = buf.get_i32_le();
14208        __struct.alt = buf.get_f32_le();
14209        __struct.hdop = buf.get_f32_le();
14210        __struct.vdop = buf.get_f32_le();
14211        __struct.vn = buf.get_f32_le();
14212        __struct.ve = buf.get_f32_le();
14213        __struct.vd = buf.get_f32_le();
14214        __struct.speed_accuracy = buf.get_f32_le();
14215        __struct.horiz_accuracy = buf.get_f32_le();
14216        __struct.vert_accuracy = buf.get_f32_le();
14217        let tmp = buf.get_u16_le();
14218        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14219            tmp & GpsInputIgnoreFlags::all().bits(),
14220        )
14221        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14222            flag_type: "GpsInputIgnoreFlags",
14223            value: tmp as u32,
14224        })?;
14225        __struct.time_week = buf.get_u16_le();
14226        __struct.gps_id = buf.get_u8();
14227        __struct.fix_type = buf.get_u8();
14228        __struct.satellites_visible = buf.get_u8();
14229        __struct.yaw = buf.get_u16_le();
14230        Ok(__struct)
14231    }
14232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14233        let mut __tmp = BytesMut::new(bytes);
14234        #[allow(clippy::absurd_extreme_comparisons)]
14235        #[allow(unused_comparisons)]
14236        if __tmp.remaining() < Self::ENCODED_LEN {
14237            panic!(
14238                "buffer is too small (need {} bytes, but got {})",
14239                Self::ENCODED_LEN,
14240                __tmp.remaining(),
14241            )
14242        }
14243        __tmp.put_u64_le(self.time_usec);
14244        __tmp.put_u32_le(self.time_week_ms);
14245        __tmp.put_i32_le(self.lat);
14246        __tmp.put_i32_le(self.lon);
14247        __tmp.put_f32_le(self.alt);
14248        __tmp.put_f32_le(self.hdop);
14249        __tmp.put_f32_le(self.vdop);
14250        __tmp.put_f32_le(self.vn);
14251        __tmp.put_f32_le(self.ve);
14252        __tmp.put_f32_le(self.vd);
14253        __tmp.put_f32_le(self.speed_accuracy);
14254        __tmp.put_f32_le(self.horiz_accuracy);
14255        __tmp.put_f32_le(self.vert_accuracy);
14256        __tmp.put_u16_le(self.ignore_flags.bits());
14257        __tmp.put_u16_le(self.time_week);
14258        __tmp.put_u8(self.gps_id);
14259        __tmp.put_u8(self.fix_type);
14260        __tmp.put_u8(self.satellites_visible);
14261        if matches!(version, MavlinkVersion::V2) {
14262            __tmp.put_u16_le(self.yaw);
14263            let len = __tmp.len();
14264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14265        } else {
14266            __tmp.len()
14267        }
14268    }
14269}
14270#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14271#[doc = ""]
14272#[doc = "ID: 24"]
14273#[derive(Debug, Clone, PartialEq)]
14274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14276#[cfg_attr(feature = "ts", derive(TS))]
14277#[cfg_attr(feature = "ts", ts(export))]
14278pub struct GPS_RAW_INT_DATA {
14279    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14280    pub time_usec: u64,
14281    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14282    pub lat: i32,
14283    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14284    pub lon: i32,
14285    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14286    pub alt: i32,
14287    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14288    pub eph: u16,
14289    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14290    pub epv: u16,
14291    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14292    pub vel: u16,
14293    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14294    pub cog: u16,
14295    #[doc = "GPS fix type."]
14296    pub fix_type: GpsFixType,
14297    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14298    pub satellites_visible: u8,
14299    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14301    pub alt_ellipsoid: i32,
14302    #[doc = "Position uncertainty."]
14303    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14304    pub h_acc: u32,
14305    #[doc = "Altitude uncertainty."]
14306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14307    pub v_acc: u32,
14308    #[doc = "Speed uncertainty."]
14309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14310    pub vel_acc: u32,
14311    #[doc = "Heading / track uncertainty"]
14312    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14313    pub hdg_acc: u32,
14314    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14315    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14316    pub yaw: u16,
14317}
14318impl GPS_RAW_INT_DATA {
14319    pub const ENCODED_LEN: usize = 52usize;
14320    pub const DEFAULT: Self = Self {
14321        time_usec: 0_u64,
14322        lat: 0_i32,
14323        lon: 0_i32,
14324        alt: 0_i32,
14325        eph: 0_u16,
14326        epv: 0_u16,
14327        vel: 0_u16,
14328        cog: 0_u16,
14329        fix_type: GpsFixType::DEFAULT,
14330        satellites_visible: 0_u8,
14331        alt_ellipsoid: 0_i32,
14332        h_acc: 0_u32,
14333        v_acc: 0_u32,
14334        vel_acc: 0_u32,
14335        hdg_acc: 0_u32,
14336        yaw: 0_u16,
14337    };
14338    #[cfg(feature = "arbitrary")]
14339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14340        use arbitrary::{Arbitrary, Unstructured};
14341        let mut buf = [0u8; 1024];
14342        rng.fill_bytes(&mut buf);
14343        let mut unstructured = Unstructured::new(&buf);
14344        Self::arbitrary(&mut unstructured).unwrap_or_default()
14345    }
14346}
14347impl Default for GPS_RAW_INT_DATA {
14348    fn default() -> Self {
14349        Self::DEFAULT.clone()
14350    }
14351}
14352impl MessageData for GPS_RAW_INT_DATA {
14353    type Message = MavMessage;
14354    const ID: u32 = 24u32;
14355    const NAME: &'static str = "GPS_RAW_INT";
14356    const EXTRA_CRC: u8 = 24u8;
14357    const ENCODED_LEN: usize = 52usize;
14358    fn deser(
14359        _version: MavlinkVersion,
14360        __input: &[u8],
14361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14362        let avail_len = __input.len();
14363        let mut payload_buf = [0; Self::ENCODED_LEN];
14364        let mut buf = if avail_len < Self::ENCODED_LEN {
14365            payload_buf[0..avail_len].copy_from_slice(__input);
14366            Bytes::new(&payload_buf)
14367        } else {
14368            Bytes::new(__input)
14369        };
14370        let mut __struct = Self::default();
14371        __struct.time_usec = buf.get_u64_le();
14372        __struct.lat = buf.get_i32_le();
14373        __struct.lon = buf.get_i32_le();
14374        __struct.alt = buf.get_i32_le();
14375        __struct.eph = buf.get_u16_le();
14376        __struct.epv = buf.get_u16_le();
14377        __struct.vel = buf.get_u16_le();
14378        __struct.cog = buf.get_u16_le();
14379        let tmp = buf.get_u8();
14380        __struct.fix_type =
14381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14382                enum_type: "GpsFixType",
14383                value: tmp as u32,
14384            })?;
14385        __struct.satellites_visible = buf.get_u8();
14386        __struct.alt_ellipsoid = buf.get_i32_le();
14387        __struct.h_acc = buf.get_u32_le();
14388        __struct.v_acc = buf.get_u32_le();
14389        __struct.vel_acc = buf.get_u32_le();
14390        __struct.hdg_acc = buf.get_u32_le();
14391        __struct.yaw = buf.get_u16_le();
14392        Ok(__struct)
14393    }
14394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14395        let mut __tmp = BytesMut::new(bytes);
14396        #[allow(clippy::absurd_extreme_comparisons)]
14397        #[allow(unused_comparisons)]
14398        if __tmp.remaining() < Self::ENCODED_LEN {
14399            panic!(
14400                "buffer is too small (need {} bytes, but got {})",
14401                Self::ENCODED_LEN,
14402                __tmp.remaining(),
14403            )
14404        }
14405        __tmp.put_u64_le(self.time_usec);
14406        __tmp.put_i32_le(self.lat);
14407        __tmp.put_i32_le(self.lon);
14408        __tmp.put_i32_le(self.alt);
14409        __tmp.put_u16_le(self.eph);
14410        __tmp.put_u16_le(self.epv);
14411        __tmp.put_u16_le(self.vel);
14412        __tmp.put_u16_le(self.cog);
14413        __tmp.put_u8(self.fix_type as u8);
14414        __tmp.put_u8(self.satellites_visible);
14415        if matches!(version, MavlinkVersion::V2) {
14416            __tmp.put_i32_le(self.alt_ellipsoid);
14417            __tmp.put_u32_le(self.h_acc);
14418            __tmp.put_u32_le(self.v_acc);
14419            __tmp.put_u32_le(self.vel_acc);
14420            __tmp.put_u32_le(self.hdg_acc);
14421            __tmp.put_u16_le(self.yaw);
14422            let len = __tmp.len();
14423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14424        } else {
14425            __tmp.len()
14426        }
14427    }
14428}
14429#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14430#[doc = ""]
14431#[doc = "ID: 233"]
14432#[derive(Debug, Clone, PartialEq)]
14433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14435#[cfg_attr(feature = "ts", derive(TS))]
14436#[cfg_attr(feature = "ts", ts(export))]
14437pub struct GPS_RTCM_DATA_DATA {
14438    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14439    pub flags: u8,
14440    #[doc = "data length"]
14441    pub len: u8,
14442    #[doc = "RTCM message (may be fragmented)"]
14443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14445    pub data: [u8; 180],
14446}
14447impl GPS_RTCM_DATA_DATA {
14448    pub const ENCODED_LEN: usize = 182usize;
14449    pub const DEFAULT: Self = Self {
14450        flags: 0_u8,
14451        len: 0_u8,
14452        data: [0_u8; 180usize],
14453    };
14454    #[cfg(feature = "arbitrary")]
14455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14456        use arbitrary::{Arbitrary, Unstructured};
14457        let mut buf = [0u8; 1024];
14458        rng.fill_bytes(&mut buf);
14459        let mut unstructured = Unstructured::new(&buf);
14460        Self::arbitrary(&mut unstructured).unwrap_or_default()
14461    }
14462}
14463impl Default for GPS_RTCM_DATA_DATA {
14464    fn default() -> Self {
14465        Self::DEFAULT.clone()
14466    }
14467}
14468impl MessageData for GPS_RTCM_DATA_DATA {
14469    type Message = MavMessage;
14470    const ID: u32 = 233u32;
14471    const NAME: &'static str = "GPS_RTCM_DATA";
14472    const EXTRA_CRC: u8 = 35u8;
14473    const ENCODED_LEN: usize = 182usize;
14474    fn deser(
14475        _version: MavlinkVersion,
14476        __input: &[u8],
14477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14478        let avail_len = __input.len();
14479        let mut payload_buf = [0; Self::ENCODED_LEN];
14480        let mut buf = if avail_len < Self::ENCODED_LEN {
14481            payload_buf[0..avail_len].copy_from_slice(__input);
14482            Bytes::new(&payload_buf)
14483        } else {
14484            Bytes::new(__input)
14485        };
14486        let mut __struct = Self::default();
14487        __struct.flags = buf.get_u8();
14488        __struct.len = buf.get_u8();
14489        for v in &mut __struct.data {
14490            let val = buf.get_u8();
14491            *v = val;
14492        }
14493        Ok(__struct)
14494    }
14495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14496        let mut __tmp = BytesMut::new(bytes);
14497        #[allow(clippy::absurd_extreme_comparisons)]
14498        #[allow(unused_comparisons)]
14499        if __tmp.remaining() < Self::ENCODED_LEN {
14500            panic!(
14501                "buffer is too small (need {} bytes, but got {})",
14502                Self::ENCODED_LEN,
14503                __tmp.remaining(),
14504            )
14505        }
14506        __tmp.put_u8(self.flags);
14507        __tmp.put_u8(self.len);
14508        for val in &self.data {
14509            __tmp.put_u8(*val);
14510        }
14511        if matches!(version, MavlinkVersion::V2) {
14512            let len = __tmp.len();
14513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14514        } else {
14515            __tmp.len()
14516        }
14517    }
14518}
14519#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14520#[doc = ""]
14521#[doc = "ID: 127"]
14522#[derive(Debug, Clone, PartialEq)]
14523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14525#[cfg_attr(feature = "ts", derive(TS))]
14526#[cfg_attr(feature = "ts", ts(export))]
14527pub struct GPS_RTK_DATA {
14528    #[doc = "Time since boot of last baseline message received."]
14529    pub time_last_baseline_ms: u32,
14530    #[doc = "GPS Time of Week of last baseline"]
14531    pub tow: u32,
14532    #[doc = "Current baseline in ECEF x or NED north component."]
14533    pub baseline_a_mm: i32,
14534    #[doc = "Current baseline in ECEF y or NED east component."]
14535    pub baseline_b_mm: i32,
14536    #[doc = "Current baseline in ECEF z or NED down component."]
14537    pub baseline_c_mm: i32,
14538    #[doc = "Current estimate of baseline accuracy."]
14539    pub accuracy: u32,
14540    #[doc = "Current number of integer ambiguity hypotheses."]
14541    pub iar_num_hypotheses: i32,
14542    #[doc = "GPS Week Number of last baseline"]
14543    pub wn: u16,
14544    #[doc = "Identification of connected RTK receiver."]
14545    pub rtk_receiver_id: u8,
14546    #[doc = "GPS-specific health report for RTK data."]
14547    pub rtk_health: u8,
14548    #[doc = "Rate of baseline messages being received by GPS"]
14549    pub rtk_rate: u8,
14550    #[doc = "Current number of sats used for RTK calculation."]
14551    pub nsats: u8,
14552    #[doc = "Coordinate system of baseline"]
14553    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14554}
14555impl GPS_RTK_DATA {
14556    pub const ENCODED_LEN: usize = 35usize;
14557    pub const DEFAULT: Self = Self {
14558        time_last_baseline_ms: 0_u32,
14559        tow: 0_u32,
14560        baseline_a_mm: 0_i32,
14561        baseline_b_mm: 0_i32,
14562        baseline_c_mm: 0_i32,
14563        accuracy: 0_u32,
14564        iar_num_hypotheses: 0_i32,
14565        wn: 0_u16,
14566        rtk_receiver_id: 0_u8,
14567        rtk_health: 0_u8,
14568        rtk_rate: 0_u8,
14569        nsats: 0_u8,
14570        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14571    };
14572    #[cfg(feature = "arbitrary")]
14573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14574        use arbitrary::{Arbitrary, Unstructured};
14575        let mut buf = [0u8; 1024];
14576        rng.fill_bytes(&mut buf);
14577        let mut unstructured = Unstructured::new(&buf);
14578        Self::arbitrary(&mut unstructured).unwrap_or_default()
14579    }
14580}
14581impl Default for GPS_RTK_DATA {
14582    fn default() -> Self {
14583        Self::DEFAULT.clone()
14584    }
14585}
14586impl MessageData for GPS_RTK_DATA {
14587    type Message = MavMessage;
14588    const ID: u32 = 127u32;
14589    const NAME: &'static str = "GPS_RTK";
14590    const EXTRA_CRC: u8 = 25u8;
14591    const ENCODED_LEN: usize = 35usize;
14592    fn deser(
14593        _version: MavlinkVersion,
14594        __input: &[u8],
14595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14596        let avail_len = __input.len();
14597        let mut payload_buf = [0; Self::ENCODED_LEN];
14598        let mut buf = if avail_len < Self::ENCODED_LEN {
14599            payload_buf[0..avail_len].copy_from_slice(__input);
14600            Bytes::new(&payload_buf)
14601        } else {
14602            Bytes::new(__input)
14603        };
14604        let mut __struct = Self::default();
14605        __struct.time_last_baseline_ms = buf.get_u32_le();
14606        __struct.tow = buf.get_u32_le();
14607        __struct.baseline_a_mm = buf.get_i32_le();
14608        __struct.baseline_b_mm = buf.get_i32_le();
14609        __struct.baseline_c_mm = buf.get_i32_le();
14610        __struct.accuracy = buf.get_u32_le();
14611        __struct.iar_num_hypotheses = buf.get_i32_le();
14612        __struct.wn = buf.get_u16_le();
14613        __struct.rtk_receiver_id = buf.get_u8();
14614        __struct.rtk_health = buf.get_u8();
14615        __struct.rtk_rate = buf.get_u8();
14616        __struct.nsats = buf.get_u8();
14617        let tmp = buf.get_u8();
14618        __struct.baseline_coords_type =
14619            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14620                enum_type: "RtkBaselineCoordinateSystem",
14621                value: tmp as u32,
14622            })?;
14623        Ok(__struct)
14624    }
14625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14626        let mut __tmp = BytesMut::new(bytes);
14627        #[allow(clippy::absurd_extreme_comparisons)]
14628        #[allow(unused_comparisons)]
14629        if __tmp.remaining() < Self::ENCODED_LEN {
14630            panic!(
14631                "buffer is too small (need {} bytes, but got {})",
14632                Self::ENCODED_LEN,
14633                __tmp.remaining(),
14634            )
14635        }
14636        __tmp.put_u32_le(self.time_last_baseline_ms);
14637        __tmp.put_u32_le(self.tow);
14638        __tmp.put_i32_le(self.baseline_a_mm);
14639        __tmp.put_i32_le(self.baseline_b_mm);
14640        __tmp.put_i32_le(self.baseline_c_mm);
14641        __tmp.put_u32_le(self.accuracy);
14642        __tmp.put_i32_le(self.iar_num_hypotheses);
14643        __tmp.put_u16_le(self.wn);
14644        __tmp.put_u8(self.rtk_receiver_id);
14645        __tmp.put_u8(self.rtk_health);
14646        __tmp.put_u8(self.rtk_rate);
14647        __tmp.put_u8(self.nsats);
14648        __tmp.put_u8(self.baseline_coords_type as u8);
14649        if matches!(version, MavlinkVersion::V2) {
14650            let len = __tmp.len();
14651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14652        } else {
14653            __tmp.len()
14654        }
14655    }
14656}
14657#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14658#[doc = ""]
14659#[doc = "ID: 25"]
14660#[derive(Debug, Clone, PartialEq)]
14661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14663#[cfg_attr(feature = "ts", derive(TS))]
14664#[cfg_attr(feature = "ts", ts(export))]
14665pub struct GPS_STATUS_DATA {
14666    #[doc = "Number of satellites visible"]
14667    pub satellites_visible: u8,
14668    #[doc = "Global satellite ID"]
14669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14670    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14671    pub satellite_prn: [u8; 20],
14672    #[doc = "0: Satellite not used, 1: used for localization"]
14673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14675    pub satellite_used: [u8; 20],
14676    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14678    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14679    pub satellite_elevation: [u8; 20],
14680    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14683    pub satellite_azimuth: [u8; 20],
14684    #[doc = "Signal to noise ratio of satellite"]
14685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14687    pub satellite_snr: [u8; 20],
14688}
14689impl GPS_STATUS_DATA {
14690    pub const ENCODED_LEN: usize = 101usize;
14691    pub const DEFAULT: Self = Self {
14692        satellites_visible: 0_u8,
14693        satellite_prn: [0_u8; 20usize],
14694        satellite_used: [0_u8; 20usize],
14695        satellite_elevation: [0_u8; 20usize],
14696        satellite_azimuth: [0_u8; 20usize],
14697        satellite_snr: [0_u8; 20usize],
14698    };
14699    #[cfg(feature = "arbitrary")]
14700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14701        use arbitrary::{Arbitrary, Unstructured};
14702        let mut buf = [0u8; 1024];
14703        rng.fill_bytes(&mut buf);
14704        let mut unstructured = Unstructured::new(&buf);
14705        Self::arbitrary(&mut unstructured).unwrap_or_default()
14706    }
14707}
14708impl Default for GPS_STATUS_DATA {
14709    fn default() -> Self {
14710        Self::DEFAULT.clone()
14711    }
14712}
14713impl MessageData for GPS_STATUS_DATA {
14714    type Message = MavMessage;
14715    const ID: u32 = 25u32;
14716    const NAME: &'static str = "GPS_STATUS";
14717    const EXTRA_CRC: u8 = 23u8;
14718    const ENCODED_LEN: usize = 101usize;
14719    fn deser(
14720        _version: MavlinkVersion,
14721        __input: &[u8],
14722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14723        let avail_len = __input.len();
14724        let mut payload_buf = [0; Self::ENCODED_LEN];
14725        let mut buf = if avail_len < Self::ENCODED_LEN {
14726            payload_buf[0..avail_len].copy_from_slice(__input);
14727            Bytes::new(&payload_buf)
14728        } else {
14729            Bytes::new(__input)
14730        };
14731        let mut __struct = Self::default();
14732        __struct.satellites_visible = buf.get_u8();
14733        for v in &mut __struct.satellite_prn {
14734            let val = buf.get_u8();
14735            *v = val;
14736        }
14737        for v in &mut __struct.satellite_used {
14738            let val = buf.get_u8();
14739            *v = val;
14740        }
14741        for v in &mut __struct.satellite_elevation {
14742            let val = buf.get_u8();
14743            *v = val;
14744        }
14745        for v in &mut __struct.satellite_azimuth {
14746            let val = buf.get_u8();
14747            *v = val;
14748        }
14749        for v in &mut __struct.satellite_snr {
14750            let val = buf.get_u8();
14751            *v = val;
14752        }
14753        Ok(__struct)
14754    }
14755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14756        let mut __tmp = BytesMut::new(bytes);
14757        #[allow(clippy::absurd_extreme_comparisons)]
14758        #[allow(unused_comparisons)]
14759        if __tmp.remaining() < Self::ENCODED_LEN {
14760            panic!(
14761                "buffer is too small (need {} bytes, but got {})",
14762                Self::ENCODED_LEN,
14763                __tmp.remaining(),
14764            )
14765        }
14766        __tmp.put_u8(self.satellites_visible);
14767        for val in &self.satellite_prn {
14768            __tmp.put_u8(*val);
14769        }
14770        for val in &self.satellite_used {
14771            __tmp.put_u8(*val);
14772        }
14773        for val in &self.satellite_elevation {
14774            __tmp.put_u8(*val);
14775        }
14776        for val in &self.satellite_azimuth {
14777            __tmp.put_u8(*val);
14778        }
14779        for val in &self.satellite_snr {
14780            __tmp.put_u8(*val);
14781        }
14782        if matches!(version, MavlinkVersion::V2) {
14783            let len = __tmp.len();
14784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14785        } else {
14786            __tmp.len()
14787        }
14788    }
14789}
14790#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14791#[doc = ""]
14792#[doc = "ID: 0"]
14793#[derive(Debug, Clone, PartialEq)]
14794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14796#[cfg_attr(feature = "ts", derive(TS))]
14797#[cfg_attr(feature = "ts", ts(export))]
14798pub struct HEARTBEAT_DATA {
14799    #[doc = "A bitfield for use for autopilot-specific flags"]
14800    pub custom_mode: u32,
14801    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14802    pub mavtype: MavType,
14803    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14804    pub autopilot: MavAutopilot,
14805    #[doc = "System mode bitmap."]
14806    pub base_mode: MavModeFlag,
14807    #[doc = "System status flag."]
14808    pub system_status: MavState,
14809    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14810    pub mavlink_version: u8,
14811}
14812impl HEARTBEAT_DATA {
14813    pub const ENCODED_LEN: usize = 9usize;
14814    pub const DEFAULT: Self = Self {
14815        custom_mode: 0_u32,
14816        mavtype: MavType::DEFAULT,
14817        autopilot: MavAutopilot::DEFAULT,
14818        base_mode: MavModeFlag::DEFAULT,
14819        system_status: MavState::DEFAULT,
14820        mavlink_version: MINOR_MAVLINK_VERSION,
14821    };
14822    #[cfg(feature = "arbitrary")]
14823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14824        use arbitrary::{Arbitrary, Unstructured};
14825        let mut buf = [0u8; 1024];
14826        rng.fill_bytes(&mut buf);
14827        let mut unstructured = Unstructured::new(&buf);
14828        Self::arbitrary(&mut unstructured).unwrap_or_default()
14829    }
14830}
14831impl Default for HEARTBEAT_DATA {
14832    fn default() -> Self {
14833        Self::DEFAULT.clone()
14834    }
14835}
14836impl MessageData for HEARTBEAT_DATA {
14837    type Message = MavMessage;
14838    const ID: u32 = 0u32;
14839    const NAME: &'static str = "HEARTBEAT";
14840    const EXTRA_CRC: u8 = 50u8;
14841    const ENCODED_LEN: usize = 9usize;
14842    fn deser(
14843        _version: MavlinkVersion,
14844        __input: &[u8],
14845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14846        let avail_len = __input.len();
14847        let mut payload_buf = [0; Self::ENCODED_LEN];
14848        let mut buf = if avail_len < Self::ENCODED_LEN {
14849            payload_buf[0..avail_len].copy_from_slice(__input);
14850            Bytes::new(&payload_buf)
14851        } else {
14852            Bytes::new(__input)
14853        };
14854        let mut __struct = Self::default();
14855        __struct.custom_mode = buf.get_u32_le();
14856        let tmp = buf.get_u8();
14857        __struct.mavtype =
14858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14859                enum_type: "MavType",
14860                value: tmp as u32,
14861            })?;
14862        let tmp = buf.get_u8();
14863        __struct.autopilot =
14864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14865                enum_type: "MavAutopilot",
14866                value: tmp as u32,
14867            })?;
14868        let tmp = buf.get_u8();
14869        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14870            ::mavlink_core::error::ParserError::InvalidFlag {
14871                flag_type: "MavModeFlag",
14872                value: tmp as u32,
14873            },
14874        )?;
14875        let tmp = buf.get_u8();
14876        __struct.system_status =
14877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14878                enum_type: "MavState",
14879                value: tmp as u32,
14880            })?;
14881        __struct.mavlink_version = buf.get_u8();
14882        Ok(__struct)
14883    }
14884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14885        let mut __tmp = BytesMut::new(bytes);
14886        #[allow(clippy::absurd_extreme_comparisons)]
14887        #[allow(unused_comparisons)]
14888        if __tmp.remaining() < Self::ENCODED_LEN {
14889            panic!(
14890                "buffer is too small (need {} bytes, but got {})",
14891                Self::ENCODED_LEN,
14892                __tmp.remaining(),
14893            )
14894        }
14895        __tmp.put_u32_le(self.custom_mode);
14896        __tmp.put_u8(self.mavtype as u8);
14897        __tmp.put_u8(self.autopilot as u8);
14898        __tmp.put_u8(self.base_mode.bits());
14899        __tmp.put_u8(self.system_status as u8);
14900        __tmp.put_u8(self.mavlink_version);
14901        if matches!(version, MavlinkVersion::V2) {
14902            let len = __tmp.len();
14903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14904        } else {
14905            __tmp.len()
14906        }
14907    }
14908}
14909#[doc = "The IMU readings in SI units in NED body frame."]
14910#[doc = ""]
14911#[doc = "ID: 105"]
14912#[derive(Debug, Clone, PartialEq)]
14913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14915#[cfg_attr(feature = "ts", derive(TS))]
14916#[cfg_attr(feature = "ts", ts(export))]
14917pub struct HIGHRES_IMU_DATA {
14918    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14919    pub time_usec: u64,
14920    #[doc = "X acceleration"]
14921    pub xacc: f32,
14922    #[doc = "Y acceleration"]
14923    pub yacc: f32,
14924    #[doc = "Z acceleration"]
14925    pub zacc: f32,
14926    #[doc = "Angular speed around X axis"]
14927    pub xgyro: f32,
14928    #[doc = "Angular speed around Y axis"]
14929    pub ygyro: f32,
14930    #[doc = "Angular speed around Z axis"]
14931    pub zgyro: f32,
14932    #[doc = "X Magnetic field"]
14933    pub xmag: f32,
14934    #[doc = "Y Magnetic field"]
14935    pub ymag: f32,
14936    #[doc = "Z Magnetic field"]
14937    pub zmag: f32,
14938    #[doc = "Absolute pressure"]
14939    pub abs_pressure: f32,
14940    #[doc = "Differential pressure"]
14941    pub diff_pressure: f32,
14942    #[doc = "Altitude calculated from pressure"]
14943    pub pressure_alt: f32,
14944    #[doc = "Temperature"]
14945    pub temperature: f32,
14946    #[doc = "Bitmap for fields that have updated since last message"]
14947    pub fields_updated: HighresImuUpdatedFlags,
14948    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14950    pub id: u8,
14951}
14952impl HIGHRES_IMU_DATA {
14953    pub const ENCODED_LEN: usize = 63usize;
14954    pub const DEFAULT: Self = Self {
14955        time_usec: 0_u64,
14956        xacc: 0.0_f32,
14957        yacc: 0.0_f32,
14958        zacc: 0.0_f32,
14959        xgyro: 0.0_f32,
14960        ygyro: 0.0_f32,
14961        zgyro: 0.0_f32,
14962        xmag: 0.0_f32,
14963        ymag: 0.0_f32,
14964        zmag: 0.0_f32,
14965        abs_pressure: 0.0_f32,
14966        diff_pressure: 0.0_f32,
14967        pressure_alt: 0.0_f32,
14968        temperature: 0.0_f32,
14969        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14970        id: 0_u8,
14971    };
14972    #[cfg(feature = "arbitrary")]
14973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14974        use arbitrary::{Arbitrary, Unstructured};
14975        let mut buf = [0u8; 1024];
14976        rng.fill_bytes(&mut buf);
14977        let mut unstructured = Unstructured::new(&buf);
14978        Self::arbitrary(&mut unstructured).unwrap_or_default()
14979    }
14980}
14981impl Default for HIGHRES_IMU_DATA {
14982    fn default() -> Self {
14983        Self::DEFAULT.clone()
14984    }
14985}
14986impl MessageData for HIGHRES_IMU_DATA {
14987    type Message = MavMessage;
14988    const ID: u32 = 105u32;
14989    const NAME: &'static str = "HIGHRES_IMU";
14990    const EXTRA_CRC: u8 = 93u8;
14991    const ENCODED_LEN: usize = 63usize;
14992    fn deser(
14993        _version: MavlinkVersion,
14994        __input: &[u8],
14995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14996        let avail_len = __input.len();
14997        let mut payload_buf = [0; Self::ENCODED_LEN];
14998        let mut buf = if avail_len < Self::ENCODED_LEN {
14999            payload_buf[0..avail_len].copy_from_slice(__input);
15000            Bytes::new(&payload_buf)
15001        } else {
15002            Bytes::new(__input)
15003        };
15004        let mut __struct = Self::default();
15005        __struct.time_usec = buf.get_u64_le();
15006        __struct.xacc = buf.get_f32_le();
15007        __struct.yacc = buf.get_f32_le();
15008        __struct.zacc = buf.get_f32_le();
15009        __struct.xgyro = buf.get_f32_le();
15010        __struct.ygyro = buf.get_f32_le();
15011        __struct.zgyro = buf.get_f32_le();
15012        __struct.xmag = buf.get_f32_le();
15013        __struct.ymag = buf.get_f32_le();
15014        __struct.zmag = buf.get_f32_le();
15015        __struct.abs_pressure = buf.get_f32_le();
15016        __struct.diff_pressure = buf.get_f32_le();
15017        __struct.pressure_alt = buf.get_f32_le();
15018        __struct.temperature = buf.get_f32_le();
15019        let tmp = buf.get_u16_le();
15020        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15021            tmp & HighresImuUpdatedFlags::all().bits(),
15022        )
15023        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15024            flag_type: "HighresImuUpdatedFlags",
15025            value: tmp as u32,
15026        })?;
15027        __struct.id = buf.get_u8();
15028        Ok(__struct)
15029    }
15030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15031        let mut __tmp = BytesMut::new(bytes);
15032        #[allow(clippy::absurd_extreme_comparisons)]
15033        #[allow(unused_comparisons)]
15034        if __tmp.remaining() < Self::ENCODED_LEN {
15035            panic!(
15036                "buffer is too small (need {} bytes, but got {})",
15037                Self::ENCODED_LEN,
15038                __tmp.remaining(),
15039            )
15040        }
15041        __tmp.put_u64_le(self.time_usec);
15042        __tmp.put_f32_le(self.xacc);
15043        __tmp.put_f32_le(self.yacc);
15044        __tmp.put_f32_le(self.zacc);
15045        __tmp.put_f32_le(self.xgyro);
15046        __tmp.put_f32_le(self.ygyro);
15047        __tmp.put_f32_le(self.zgyro);
15048        __tmp.put_f32_le(self.xmag);
15049        __tmp.put_f32_le(self.ymag);
15050        __tmp.put_f32_le(self.zmag);
15051        __tmp.put_f32_le(self.abs_pressure);
15052        __tmp.put_f32_le(self.diff_pressure);
15053        __tmp.put_f32_le(self.pressure_alt);
15054        __tmp.put_f32_le(self.temperature);
15055        __tmp.put_u16_le(self.fields_updated.bits());
15056        if matches!(version, MavlinkVersion::V2) {
15057            __tmp.put_u8(self.id);
15058            let len = __tmp.len();
15059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15060        } else {
15061            __tmp.len()
15062        }
15063    }
15064}
15065#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15066#[doc = "Message appropriate for high latency connections like Iridium."]
15067#[doc = ""]
15068#[doc = "ID: 234"]
15069#[derive(Debug, Clone, PartialEq)]
15070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15072#[cfg_attr(feature = "ts", derive(TS))]
15073#[cfg_attr(feature = "ts", ts(export))]
15074pub struct HIGH_LATENCY_DATA {
15075    #[doc = "A bitfield for use for autopilot-specific flags."]
15076    pub custom_mode: u32,
15077    #[doc = "Latitude"]
15078    pub latitude: i32,
15079    #[doc = "Longitude"]
15080    pub longitude: i32,
15081    #[doc = "roll"]
15082    pub roll: i16,
15083    #[doc = "pitch"]
15084    pub pitch: i16,
15085    #[doc = "heading"]
15086    pub heading: u16,
15087    #[doc = "heading setpoint"]
15088    pub heading_sp: i16,
15089    #[doc = "Altitude above mean sea level"]
15090    pub altitude_amsl: i16,
15091    #[doc = "Altitude setpoint relative to the home position"]
15092    pub altitude_sp: i16,
15093    #[doc = "distance to target"]
15094    pub wp_distance: u16,
15095    #[doc = "Bitmap of enabled system modes."]
15096    pub base_mode: MavModeFlag,
15097    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15098    pub landed_state: MavLandedState,
15099    #[doc = "throttle (percentage)"]
15100    pub throttle: i8,
15101    #[doc = "airspeed"]
15102    pub airspeed: u8,
15103    #[doc = "airspeed setpoint"]
15104    pub airspeed_sp: u8,
15105    #[doc = "groundspeed"]
15106    pub groundspeed: u8,
15107    #[doc = "climb rate"]
15108    pub climb_rate: i8,
15109    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15110    pub gps_nsat: u8,
15111    #[doc = "GPS Fix type."]
15112    pub gps_fix_type: GpsFixType,
15113    #[doc = "Remaining battery (percentage)"]
15114    pub battery_remaining: u8,
15115    #[doc = "Autopilot temperature (degrees C)"]
15116    pub temperature: i8,
15117    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15118    pub temperature_air: i8,
15119    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15120    pub failsafe: u8,
15121    #[doc = "current waypoint number"]
15122    pub wp_num: u8,
15123}
15124impl HIGH_LATENCY_DATA {
15125    pub const ENCODED_LEN: usize = 40usize;
15126    pub const DEFAULT: Self = Self {
15127        custom_mode: 0_u32,
15128        latitude: 0_i32,
15129        longitude: 0_i32,
15130        roll: 0_i16,
15131        pitch: 0_i16,
15132        heading: 0_u16,
15133        heading_sp: 0_i16,
15134        altitude_amsl: 0_i16,
15135        altitude_sp: 0_i16,
15136        wp_distance: 0_u16,
15137        base_mode: MavModeFlag::DEFAULT,
15138        landed_state: MavLandedState::DEFAULT,
15139        throttle: 0_i8,
15140        airspeed: 0_u8,
15141        airspeed_sp: 0_u8,
15142        groundspeed: 0_u8,
15143        climb_rate: 0_i8,
15144        gps_nsat: 0_u8,
15145        gps_fix_type: GpsFixType::DEFAULT,
15146        battery_remaining: 0_u8,
15147        temperature: 0_i8,
15148        temperature_air: 0_i8,
15149        failsafe: 0_u8,
15150        wp_num: 0_u8,
15151    };
15152    #[cfg(feature = "arbitrary")]
15153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15154        use arbitrary::{Arbitrary, Unstructured};
15155        let mut buf = [0u8; 1024];
15156        rng.fill_bytes(&mut buf);
15157        let mut unstructured = Unstructured::new(&buf);
15158        Self::arbitrary(&mut unstructured).unwrap_or_default()
15159    }
15160}
15161impl Default for HIGH_LATENCY_DATA {
15162    fn default() -> Self {
15163        Self::DEFAULT.clone()
15164    }
15165}
15166impl MessageData for HIGH_LATENCY_DATA {
15167    type Message = MavMessage;
15168    const ID: u32 = 234u32;
15169    const NAME: &'static str = "HIGH_LATENCY";
15170    const EXTRA_CRC: u8 = 150u8;
15171    const ENCODED_LEN: usize = 40usize;
15172    fn deser(
15173        _version: MavlinkVersion,
15174        __input: &[u8],
15175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15176        let avail_len = __input.len();
15177        let mut payload_buf = [0; Self::ENCODED_LEN];
15178        let mut buf = if avail_len < Self::ENCODED_LEN {
15179            payload_buf[0..avail_len].copy_from_slice(__input);
15180            Bytes::new(&payload_buf)
15181        } else {
15182            Bytes::new(__input)
15183        };
15184        let mut __struct = Self::default();
15185        __struct.custom_mode = buf.get_u32_le();
15186        __struct.latitude = buf.get_i32_le();
15187        __struct.longitude = buf.get_i32_le();
15188        __struct.roll = buf.get_i16_le();
15189        __struct.pitch = buf.get_i16_le();
15190        __struct.heading = buf.get_u16_le();
15191        __struct.heading_sp = buf.get_i16_le();
15192        __struct.altitude_amsl = buf.get_i16_le();
15193        __struct.altitude_sp = buf.get_i16_le();
15194        __struct.wp_distance = buf.get_u16_le();
15195        let tmp = buf.get_u8();
15196        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15197            ::mavlink_core::error::ParserError::InvalidFlag {
15198                flag_type: "MavModeFlag",
15199                value: tmp as u32,
15200            },
15201        )?;
15202        let tmp = buf.get_u8();
15203        __struct.landed_state =
15204            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15205                enum_type: "MavLandedState",
15206                value: tmp as u32,
15207            })?;
15208        __struct.throttle = buf.get_i8();
15209        __struct.airspeed = buf.get_u8();
15210        __struct.airspeed_sp = buf.get_u8();
15211        __struct.groundspeed = buf.get_u8();
15212        __struct.climb_rate = buf.get_i8();
15213        __struct.gps_nsat = buf.get_u8();
15214        let tmp = buf.get_u8();
15215        __struct.gps_fix_type =
15216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15217                enum_type: "GpsFixType",
15218                value: tmp as u32,
15219            })?;
15220        __struct.battery_remaining = buf.get_u8();
15221        __struct.temperature = buf.get_i8();
15222        __struct.temperature_air = buf.get_i8();
15223        __struct.failsafe = buf.get_u8();
15224        __struct.wp_num = buf.get_u8();
15225        Ok(__struct)
15226    }
15227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15228        let mut __tmp = BytesMut::new(bytes);
15229        #[allow(clippy::absurd_extreme_comparisons)]
15230        #[allow(unused_comparisons)]
15231        if __tmp.remaining() < Self::ENCODED_LEN {
15232            panic!(
15233                "buffer is too small (need {} bytes, but got {})",
15234                Self::ENCODED_LEN,
15235                __tmp.remaining(),
15236            )
15237        }
15238        __tmp.put_u32_le(self.custom_mode);
15239        __tmp.put_i32_le(self.latitude);
15240        __tmp.put_i32_le(self.longitude);
15241        __tmp.put_i16_le(self.roll);
15242        __tmp.put_i16_le(self.pitch);
15243        __tmp.put_u16_le(self.heading);
15244        __tmp.put_i16_le(self.heading_sp);
15245        __tmp.put_i16_le(self.altitude_amsl);
15246        __tmp.put_i16_le(self.altitude_sp);
15247        __tmp.put_u16_le(self.wp_distance);
15248        __tmp.put_u8(self.base_mode.bits());
15249        __tmp.put_u8(self.landed_state as u8);
15250        __tmp.put_i8(self.throttle);
15251        __tmp.put_u8(self.airspeed);
15252        __tmp.put_u8(self.airspeed_sp);
15253        __tmp.put_u8(self.groundspeed);
15254        __tmp.put_i8(self.climb_rate);
15255        __tmp.put_u8(self.gps_nsat);
15256        __tmp.put_u8(self.gps_fix_type as u8);
15257        __tmp.put_u8(self.battery_remaining);
15258        __tmp.put_i8(self.temperature);
15259        __tmp.put_i8(self.temperature_air);
15260        __tmp.put_u8(self.failsafe);
15261        __tmp.put_u8(self.wp_num);
15262        if matches!(version, MavlinkVersion::V2) {
15263            let len = __tmp.len();
15264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15265        } else {
15266            __tmp.len()
15267        }
15268    }
15269}
15270#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15271#[doc = ""]
15272#[doc = "ID: 235"]
15273#[derive(Debug, Clone, PartialEq)]
15274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15276#[cfg_attr(feature = "ts", derive(TS))]
15277#[cfg_attr(feature = "ts", ts(export))]
15278pub struct HIGH_LATENCY2_DATA {
15279    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15280    pub timestamp: u32,
15281    #[doc = "Latitude"]
15282    pub latitude: i32,
15283    #[doc = "Longitude"]
15284    pub longitude: i32,
15285    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15286    pub custom_mode: u16,
15287    #[doc = "Altitude above mean sea level"]
15288    pub altitude: i16,
15289    #[doc = "Altitude setpoint"]
15290    pub target_altitude: i16,
15291    #[doc = "Distance to target waypoint or position"]
15292    pub target_distance: u16,
15293    #[doc = "Current waypoint number"]
15294    pub wp_num: u16,
15295    #[doc = "Bitmap of failure flags."]
15296    pub failure_flags: HlFailureFlag,
15297    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15298    pub mavtype: MavType,
15299    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15300    pub autopilot: MavAutopilot,
15301    #[doc = "Heading"]
15302    pub heading: u8,
15303    #[doc = "Heading setpoint"]
15304    pub target_heading: u8,
15305    #[doc = "Throttle"]
15306    pub throttle: u8,
15307    #[doc = "Airspeed"]
15308    pub airspeed: u8,
15309    #[doc = "Airspeed setpoint"]
15310    pub airspeed_sp: u8,
15311    #[doc = "Groundspeed"]
15312    pub groundspeed: u8,
15313    #[doc = "Windspeed"]
15314    pub windspeed: u8,
15315    #[doc = "Wind heading"]
15316    pub wind_heading: u8,
15317    #[doc = "Maximum error horizontal position since last message"]
15318    pub eph: u8,
15319    #[doc = "Maximum error vertical position since last message"]
15320    pub epv: u8,
15321    #[doc = "Air temperature"]
15322    pub temperature_air: i8,
15323    #[doc = "Maximum climb rate magnitude since last message"]
15324    pub climb_rate: i8,
15325    #[doc = "Battery level (-1 if field not provided)."]
15326    pub battery: i8,
15327    #[doc = "Field for custom payload."]
15328    pub custom0: i8,
15329    #[doc = "Field for custom payload."]
15330    pub custom1: i8,
15331    #[doc = "Field for custom payload."]
15332    pub custom2: i8,
15333}
15334impl HIGH_LATENCY2_DATA {
15335    pub const ENCODED_LEN: usize = 42usize;
15336    pub const DEFAULT: Self = Self {
15337        timestamp: 0_u32,
15338        latitude: 0_i32,
15339        longitude: 0_i32,
15340        custom_mode: 0_u16,
15341        altitude: 0_i16,
15342        target_altitude: 0_i16,
15343        target_distance: 0_u16,
15344        wp_num: 0_u16,
15345        failure_flags: HlFailureFlag::DEFAULT,
15346        mavtype: MavType::DEFAULT,
15347        autopilot: MavAutopilot::DEFAULT,
15348        heading: 0_u8,
15349        target_heading: 0_u8,
15350        throttle: 0_u8,
15351        airspeed: 0_u8,
15352        airspeed_sp: 0_u8,
15353        groundspeed: 0_u8,
15354        windspeed: 0_u8,
15355        wind_heading: 0_u8,
15356        eph: 0_u8,
15357        epv: 0_u8,
15358        temperature_air: 0_i8,
15359        climb_rate: 0_i8,
15360        battery: 0_i8,
15361        custom0: 0_i8,
15362        custom1: 0_i8,
15363        custom2: 0_i8,
15364    };
15365    #[cfg(feature = "arbitrary")]
15366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15367        use arbitrary::{Arbitrary, Unstructured};
15368        let mut buf = [0u8; 1024];
15369        rng.fill_bytes(&mut buf);
15370        let mut unstructured = Unstructured::new(&buf);
15371        Self::arbitrary(&mut unstructured).unwrap_or_default()
15372    }
15373}
15374impl Default for HIGH_LATENCY2_DATA {
15375    fn default() -> Self {
15376        Self::DEFAULT.clone()
15377    }
15378}
15379impl MessageData for HIGH_LATENCY2_DATA {
15380    type Message = MavMessage;
15381    const ID: u32 = 235u32;
15382    const NAME: &'static str = "HIGH_LATENCY2";
15383    const EXTRA_CRC: u8 = 179u8;
15384    const ENCODED_LEN: usize = 42usize;
15385    fn deser(
15386        _version: MavlinkVersion,
15387        __input: &[u8],
15388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15389        let avail_len = __input.len();
15390        let mut payload_buf = [0; Self::ENCODED_LEN];
15391        let mut buf = if avail_len < Self::ENCODED_LEN {
15392            payload_buf[0..avail_len].copy_from_slice(__input);
15393            Bytes::new(&payload_buf)
15394        } else {
15395            Bytes::new(__input)
15396        };
15397        let mut __struct = Self::default();
15398        __struct.timestamp = buf.get_u32_le();
15399        __struct.latitude = buf.get_i32_le();
15400        __struct.longitude = buf.get_i32_le();
15401        __struct.custom_mode = buf.get_u16_le();
15402        __struct.altitude = buf.get_i16_le();
15403        __struct.target_altitude = buf.get_i16_le();
15404        __struct.target_distance = buf.get_u16_le();
15405        __struct.wp_num = buf.get_u16_le();
15406        let tmp = buf.get_u16_le();
15407        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15408            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15409                flag_type: "HlFailureFlag",
15410                value: tmp as u32,
15411            })?;
15412        let tmp = buf.get_u8();
15413        __struct.mavtype =
15414            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15415                enum_type: "MavType",
15416                value: tmp as u32,
15417            })?;
15418        let tmp = buf.get_u8();
15419        __struct.autopilot =
15420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15421                enum_type: "MavAutopilot",
15422                value: tmp as u32,
15423            })?;
15424        __struct.heading = buf.get_u8();
15425        __struct.target_heading = buf.get_u8();
15426        __struct.throttle = buf.get_u8();
15427        __struct.airspeed = buf.get_u8();
15428        __struct.airspeed_sp = buf.get_u8();
15429        __struct.groundspeed = buf.get_u8();
15430        __struct.windspeed = buf.get_u8();
15431        __struct.wind_heading = buf.get_u8();
15432        __struct.eph = buf.get_u8();
15433        __struct.epv = buf.get_u8();
15434        __struct.temperature_air = buf.get_i8();
15435        __struct.climb_rate = buf.get_i8();
15436        __struct.battery = buf.get_i8();
15437        __struct.custom0 = buf.get_i8();
15438        __struct.custom1 = buf.get_i8();
15439        __struct.custom2 = buf.get_i8();
15440        Ok(__struct)
15441    }
15442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15443        let mut __tmp = BytesMut::new(bytes);
15444        #[allow(clippy::absurd_extreme_comparisons)]
15445        #[allow(unused_comparisons)]
15446        if __tmp.remaining() < Self::ENCODED_LEN {
15447            panic!(
15448                "buffer is too small (need {} bytes, but got {})",
15449                Self::ENCODED_LEN,
15450                __tmp.remaining(),
15451            )
15452        }
15453        __tmp.put_u32_le(self.timestamp);
15454        __tmp.put_i32_le(self.latitude);
15455        __tmp.put_i32_le(self.longitude);
15456        __tmp.put_u16_le(self.custom_mode);
15457        __tmp.put_i16_le(self.altitude);
15458        __tmp.put_i16_le(self.target_altitude);
15459        __tmp.put_u16_le(self.target_distance);
15460        __tmp.put_u16_le(self.wp_num);
15461        __tmp.put_u16_le(self.failure_flags.bits());
15462        __tmp.put_u8(self.mavtype as u8);
15463        __tmp.put_u8(self.autopilot as u8);
15464        __tmp.put_u8(self.heading);
15465        __tmp.put_u8(self.target_heading);
15466        __tmp.put_u8(self.throttle);
15467        __tmp.put_u8(self.airspeed);
15468        __tmp.put_u8(self.airspeed_sp);
15469        __tmp.put_u8(self.groundspeed);
15470        __tmp.put_u8(self.windspeed);
15471        __tmp.put_u8(self.wind_heading);
15472        __tmp.put_u8(self.eph);
15473        __tmp.put_u8(self.epv);
15474        __tmp.put_i8(self.temperature_air);
15475        __tmp.put_i8(self.climb_rate);
15476        __tmp.put_i8(self.battery);
15477        __tmp.put_i8(self.custom0);
15478        __tmp.put_i8(self.custom1);
15479        __tmp.put_i8(self.custom2);
15480        if matches!(version, MavlinkVersion::V2) {
15481            let len = __tmp.len();
15482            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15483        } else {
15484            __tmp.len()
15485        }
15486    }
15487}
15488#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15489#[doc = ""]
15490#[doc = "ID: 93"]
15491#[derive(Debug, Clone, PartialEq)]
15492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15494#[cfg_attr(feature = "ts", derive(TS))]
15495#[cfg_attr(feature = "ts", ts(export))]
15496pub struct HIL_ACTUATOR_CONTROLS_DATA {
15497    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15498    pub time_usec: u64,
15499    #[doc = "Flags bitmask."]
15500    pub flags: HilActuatorControlsFlags,
15501    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15504    pub controls: [f32; 16],
15505    #[doc = "System mode. Includes arming state."]
15506    pub mode: MavModeFlag,
15507}
15508impl HIL_ACTUATOR_CONTROLS_DATA {
15509    pub const ENCODED_LEN: usize = 81usize;
15510    pub const DEFAULT: Self = Self {
15511        time_usec: 0_u64,
15512        flags: HilActuatorControlsFlags::DEFAULT,
15513        controls: [0.0_f32; 16usize],
15514        mode: MavModeFlag::DEFAULT,
15515    };
15516    #[cfg(feature = "arbitrary")]
15517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15518        use arbitrary::{Arbitrary, Unstructured};
15519        let mut buf = [0u8; 1024];
15520        rng.fill_bytes(&mut buf);
15521        let mut unstructured = Unstructured::new(&buf);
15522        Self::arbitrary(&mut unstructured).unwrap_or_default()
15523    }
15524}
15525impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15526    fn default() -> Self {
15527        Self::DEFAULT.clone()
15528    }
15529}
15530impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15531    type Message = MavMessage;
15532    const ID: u32 = 93u32;
15533    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15534    const EXTRA_CRC: u8 = 47u8;
15535    const ENCODED_LEN: usize = 81usize;
15536    fn deser(
15537        _version: MavlinkVersion,
15538        __input: &[u8],
15539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15540        let avail_len = __input.len();
15541        let mut payload_buf = [0; Self::ENCODED_LEN];
15542        let mut buf = if avail_len < Self::ENCODED_LEN {
15543            payload_buf[0..avail_len].copy_from_slice(__input);
15544            Bytes::new(&payload_buf)
15545        } else {
15546            Bytes::new(__input)
15547        };
15548        let mut __struct = Self::default();
15549        __struct.time_usec = buf.get_u64_le();
15550        let tmp = buf.get_u64_le();
15551        __struct.flags =
15552            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15553                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15554                    flag_type: "HilActuatorControlsFlags",
15555                    value: tmp as u32,
15556                })?;
15557        for v in &mut __struct.controls {
15558            let val = buf.get_f32_le();
15559            *v = val;
15560        }
15561        let tmp = buf.get_u8();
15562        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15563            ::mavlink_core::error::ParserError::InvalidFlag {
15564                flag_type: "MavModeFlag",
15565                value: tmp as u32,
15566            },
15567        )?;
15568        Ok(__struct)
15569    }
15570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15571        let mut __tmp = BytesMut::new(bytes);
15572        #[allow(clippy::absurd_extreme_comparisons)]
15573        #[allow(unused_comparisons)]
15574        if __tmp.remaining() < Self::ENCODED_LEN {
15575            panic!(
15576                "buffer is too small (need {} bytes, but got {})",
15577                Self::ENCODED_LEN,
15578                __tmp.remaining(),
15579            )
15580        }
15581        __tmp.put_u64_le(self.time_usec);
15582        __tmp.put_u64_le(self.flags.bits());
15583        for val in &self.controls {
15584            __tmp.put_f32_le(*val);
15585        }
15586        __tmp.put_u8(self.mode.bits());
15587        if matches!(version, MavlinkVersion::V2) {
15588            let len = __tmp.len();
15589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15590        } else {
15591            __tmp.len()
15592        }
15593    }
15594}
15595#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15596#[doc = ""]
15597#[doc = "ID: 91"]
15598#[derive(Debug, Clone, PartialEq)]
15599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15601#[cfg_attr(feature = "ts", derive(TS))]
15602#[cfg_attr(feature = "ts", ts(export))]
15603pub struct HIL_CONTROLS_DATA {
15604    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15605    pub time_usec: u64,
15606    #[doc = "Control output -1 .. 1"]
15607    pub roll_ailerons: f32,
15608    #[doc = "Control output -1 .. 1"]
15609    pub pitch_elevator: f32,
15610    #[doc = "Control output -1 .. 1"]
15611    pub yaw_rudder: f32,
15612    #[doc = "Throttle 0 .. 1"]
15613    pub throttle: f32,
15614    #[doc = "Aux 1, -1 .. 1"]
15615    pub aux1: f32,
15616    #[doc = "Aux 2, -1 .. 1"]
15617    pub aux2: f32,
15618    #[doc = "Aux 3, -1 .. 1"]
15619    pub aux3: f32,
15620    #[doc = "Aux 4, -1 .. 1"]
15621    pub aux4: f32,
15622    #[doc = "System mode."]
15623    pub mode: MavMode,
15624    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15625    pub nav_mode: u8,
15626}
15627impl HIL_CONTROLS_DATA {
15628    pub const ENCODED_LEN: usize = 42usize;
15629    pub const DEFAULT: Self = Self {
15630        time_usec: 0_u64,
15631        roll_ailerons: 0.0_f32,
15632        pitch_elevator: 0.0_f32,
15633        yaw_rudder: 0.0_f32,
15634        throttle: 0.0_f32,
15635        aux1: 0.0_f32,
15636        aux2: 0.0_f32,
15637        aux3: 0.0_f32,
15638        aux4: 0.0_f32,
15639        mode: MavMode::DEFAULT,
15640        nav_mode: 0_u8,
15641    };
15642    #[cfg(feature = "arbitrary")]
15643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15644        use arbitrary::{Arbitrary, Unstructured};
15645        let mut buf = [0u8; 1024];
15646        rng.fill_bytes(&mut buf);
15647        let mut unstructured = Unstructured::new(&buf);
15648        Self::arbitrary(&mut unstructured).unwrap_or_default()
15649    }
15650}
15651impl Default for HIL_CONTROLS_DATA {
15652    fn default() -> Self {
15653        Self::DEFAULT.clone()
15654    }
15655}
15656impl MessageData for HIL_CONTROLS_DATA {
15657    type Message = MavMessage;
15658    const ID: u32 = 91u32;
15659    const NAME: &'static str = "HIL_CONTROLS";
15660    const EXTRA_CRC: u8 = 63u8;
15661    const ENCODED_LEN: usize = 42usize;
15662    fn deser(
15663        _version: MavlinkVersion,
15664        __input: &[u8],
15665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15666        let avail_len = __input.len();
15667        let mut payload_buf = [0; Self::ENCODED_LEN];
15668        let mut buf = if avail_len < Self::ENCODED_LEN {
15669            payload_buf[0..avail_len].copy_from_slice(__input);
15670            Bytes::new(&payload_buf)
15671        } else {
15672            Bytes::new(__input)
15673        };
15674        let mut __struct = Self::default();
15675        __struct.time_usec = buf.get_u64_le();
15676        __struct.roll_ailerons = buf.get_f32_le();
15677        __struct.pitch_elevator = buf.get_f32_le();
15678        __struct.yaw_rudder = buf.get_f32_le();
15679        __struct.throttle = buf.get_f32_le();
15680        __struct.aux1 = buf.get_f32_le();
15681        __struct.aux2 = buf.get_f32_le();
15682        __struct.aux3 = buf.get_f32_le();
15683        __struct.aux4 = buf.get_f32_le();
15684        let tmp = buf.get_u8();
15685        __struct.mode =
15686            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15687                enum_type: "MavMode",
15688                value: tmp as u32,
15689            })?;
15690        __struct.nav_mode = buf.get_u8();
15691        Ok(__struct)
15692    }
15693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15694        let mut __tmp = BytesMut::new(bytes);
15695        #[allow(clippy::absurd_extreme_comparisons)]
15696        #[allow(unused_comparisons)]
15697        if __tmp.remaining() < Self::ENCODED_LEN {
15698            panic!(
15699                "buffer is too small (need {} bytes, but got {})",
15700                Self::ENCODED_LEN,
15701                __tmp.remaining(),
15702            )
15703        }
15704        __tmp.put_u64_le(self.time_usec);
15705        __tmp.put_f32_le(self.roll_ailerons);
15706        __tmp.put_f32_le(self.pitch_elevator);
15707        __tmp.put_f32_le(self.yaw_rudder);
15708        __tmp.put_f32_le(self.throttle);
15709        __tmp.put_f32_le(self.aux1);
15710        __tmp.put_f32_le(self.aux2);
15711        __tmp.put_f32_le(self.aux3);
15712        __tmp.put_f32_le(self.aux4);
15713        __tmp.put_u8(self.mode as u8);
15714        __tmp.put_u8(self.nav_mode);
15715        if matches!(version, MavlinkVersion::V2) {
15716            let len = __tmp.len();
15717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15718        } else {
15719            __tmp.len()
15720        }
15721    }
15722}
15723#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15724#[doc = ""]
15725#[doc = "ID: 113"]
15726#[derive(Debug, Clone, PartialEq)]
15727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15729#[cfg_attr(feature = "ts", derive(TS))]
15730#[cfg_attr(feature = "ts", ts(export))]
15731pub struct HIL_GPS_DATA {
15732    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15733    pub time_usec: u64,
15734    #[doc = "Latitude (WGS84)"]
15735    pub lat: i32,
15736    #[doc = "Longitude (WGS84)"]
15737    pub lon: i32,
15738    #[doc = "Altitude (MSL). Positive for up."]
15739    pub alt: i32,
15740    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15741    pub eph: u16,
15742    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15743    pub epv: u16,
15744    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15745    pub vel: u16,
15746    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15747    pub vn: i16,
15748    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15749    pub ve: i16,
15750    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15751    pub vd: i16,
15752    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15753    pub cog: u16,
15754    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15755    pub fix_type: u8,
15756    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15757    pub satellites_visible: u8,
15758    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15760    pub id: u8,
15761    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15763    pub yaw: u16,
15764}
15765impl HIL_GPS_DATA {
15766    pub const ENCODED_LEN: usize = 39usize;
15767    pub const DEFAULT: Self = Self {
15768        time_usec: 0_u64,
15769        lat: 0_i32,
15770        lon: 0_i32,
15771        alt: 0_i32,
15772        eph: 0_u16,
15773        epv: 0_u16,
15774        vel: 0_u16,
15775        vn: 0_i16,
15776        ve: 0_i16,
15777        vd: 0_i16,
15778        cog: 0_u16,
15779        fix_type: 0_u8,
15780        satellites_visible: 0_u8,
15781        id: 0_u8,
15782        yaw: 0_u16,
15783    };
15784    #[cfg(feature = "arbitrary")]
15785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15786        use arbitrary::{Arbitrary, Unstructured};
15787        let mut buf = [0u8; 1024];
15788        rng.fill_bytes(&mut buf);
15789        let mut unstructured = Unstructured::new(&buf);
15790        Self::arbitrary(&mut unstructured).unwrap_or_default()
15791    }
15792}
15793impl Default for HIL_GPS_DATA {
15794    fn default() -> Self {
15795        Self::DEFAULT.clone()
15796    }
15797}
15798impl MessageData for HIL_GPS_DATA {
15799    type Message = MavMessage;
15800    const ID: u32 = 113u32;
15801    const NAME: &'static str = "HIL_GPS";
15802    const EXTRA_CRC: u8 = 124u8;
15803    const ENCODED_LEN: usize = 39usize;
15804    fn deser(
15805        _version: MavlinkVersion,
15806        __input: &[u8],
15807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15808        let avail_len = __input.len();
15809        let mut payload_buf = [0; Self::ENCODED_LEN];
15810        let mut buf = if avail_len < Self::ENCODED_LEN {
15811            payload_buf[0..avail_len].copy_from_slice(__input);
15812            Bytes::new(&payload_buf)
15813        } else {
15814            Bytes::new(__input)
15815        };
15816        let mut __struct = Self::default();
15817        __struct.time_usec = buf.get_u64_le();
15818        __struct.lat = buf.get_i32_le();
15819        __struct.lon = buf.get_i32_le();
15820        __struct.alt = buf.get_i32_le();
15821        __struct.eph = buf.get_u16_le();
15822        __struct.epv = buf.get_u16_le();
15823        __struct.vel = buf.get_u16_le();
15824        __struct.vn = buf.get_i16_le();
15825        __struct.ve = buf.get_i16_le();
15826        __struct.vd = buf.get_i16_le();
15827        __struct.cog = buf.get_u16_le();
15828        __struct.fix_type = buf.get_u8();
15829        __struct.satellites_visible = buf.get_u8();
15830        __struct.id = buf.get_u8();
15831        __struct.yaw = buf.get_u16_le();
15832        Ok(__struct)
15833    }
15834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15835        let mut __tmp = BytesMut::new(bytes);
15836        #[allow(clippy::absurd_extreme_comparisons)]
15837        #[allow(unused_comparisons)]
15838        if __tmp.remaining() < Self::ENCODED_LEN {
15839            panic!(
15840                "buffer is too small (need {} bytes, but got {})",
15841                Self::ENCODED_LEN,
15842                __tmp.remaining(),
15843            )
15844        }
15845        __tmp.put_u64_le(self.time_usec);
15846        __tmp.put_i32_le(self.lat);
15847        __tmp.put_i32_le(self.lon);
15848        __tmp.put_i32_le(self.alt);
15849        __tmp.put_u16_le(self.eph);
15850        __tmp.put_u16_le(self.epv);
15851        __tmp.put_u16_le(self.vel);
15852        __tmp.put_i16_le(self.vn);
15853        __tmp.put_i16_le(self.ve);
15854        __tmp.put_i16_le(self.vd);
15855        __tmp.put_u16_le(self.cog);
15856        __tmp.put_u8(self.fix_type);
15857        __tmp.put_u8(self.satellites_visible);
15858        if matches!(version, MavlinkVersion::V2) {
15859            __tmp.put_u8(self.id);
15860            __tmp.put_u16_le(self.yaw);
15861            let len = __tmp.len();
15862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15863        } else {
15864            __tmp.len()
15865        }
15866    }
15867}
15868#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15869#[doc = ""]
15870#[doc = "ID: 114"]
15871#[derive(Debug, Clone, PartialEq)]
15872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15874#[cfg_attr(feature = "ts", derive(TS))]
15875#[cfg_attr(feature = "ts", ts(export))]
15876pub struct HIL_OPTICAL_FLOW_DATA {
15877    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15878    pub time_usec: u64,
15879    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15880    pub integration_time_us: u32,
15881    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15882    pub integrated_x: f32,
15883    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15884    pub integrated_y: f32,
15885    #[doc = "RH rotation around X axis"]
15886    pub integrated_xgyro: f32,
15887    #[doc = "RH rotation around Y axis"]
15888    pub integrated_ygyro: f32,
15889    #[doc = "RH rotation around Z axis"]
15890    pub integrated_zgyro: f32,
15891    #[doc = "Time since the distance was sampled."]
15892    pub time_delta_distance_us: u32,
15893    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15894    pub distance: f32,
15895    #[doc = "Temperature"]
15896    pub temperature: i16,
15897    #[doc = "Sensor ID"]
15898    pub sensor_id: u8,
15899    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15900    pub quality: u8,
15901}
15902impl HIL_OPTICAL_FLOW_DATA {
15903    pub const ENCODED_LEN: usize = 44usize;
15904    pub const DEFAULT: Self = Self {
15905        time_usec: 0_u64,
15906        integration_time_us: 0_u32,
15907        integrated_x: 0.0_f32,
15908        integrated_y: 0.0_f32,
15909        integrated_xgyro: 0.0_f32,
15910        integrated_ygyro: 0.0_f32,
15911        integrated_zgyro: 0.0_f32,
15912        time_delta_distance_us: 0_u32,
15913        distance: 0.0_f32,
15914        temperature: 0_i16,
15915        sensor_id: 0_u8,
15916        quality: 0_u8,
15917    };
15918    #[cfg(feature = "arbitrary")]
15919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15920        use arbitrary::{Arbitrary, Unstructured};
15921        let mut buf = [0u8; 1024];
15922        rng.fill_bytes(&mut buf);
15923        let mut unstructured = Unstructured::new(&buf);
15924        Self::arbitrary(&mut unstructured).unwrap_or_default()
15925    }
15926}
15927impl Default for HIL_OPTICAL_FLOW_DATA {
15928    fn default() -> Self {
15929        Self::DEFAULT.clone()
15930    }
15931}
15932impl MessageData for HIL_OPTICAL_FLOW_DATA {
15933    type Message = MavMessage;
15934    const ID: u32 = 114u32;
15935    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15936    const EXTRA_CRC: u8 = 237u8;
15937    const ENCODED_LEN: usize = 44usize;
15938    fn deser(
15939        _version: MavlinkVersion,
15940        __input: &[u8],
15941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15942        let avail_len = __input.len();
15943        let mut payload_buf = [0; Self::ENCODED_LEN];
15944        let mut buf = if avail_len < Self::ENCODED_LEN {
15945            payload_buf[0..avail_len].copy_from_slice(__input);
15946            Bytes::new(&payload_buf)
15947        } else {
15948            Bytes::new(__input)
15949        };
15950        let mut __struct = Self::default();
15951        __struct.time_usec = buf.get_u64_le();
15952        __struct.integration_time_us = buf.get_u32_le();
15953        __struct.integrated_x = buf.get_f32_le();
15954        __struct.integrated_y = buf.get_f32_le();
15955        __struct.integrated_xgyro = buf.get_f32_le();
15956        __struct.integrated_ygyro = buf.get_f32_le();
15957        __struct.integrated_zgyro = buf.get_f32_le();
15958        __struct.time_delta_distance_us = buf.get_u32_le();
15959        __struct.distance = buf.get_f32_le();
15960        __struct.temperature = buf.get_i16_le();
15961        __struct.sensor_id = buf.get_u8();
15962        __struct.quality = buf.get_u8();
15963        Ok(__struct)
15964    }
15965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15966        let mut __tmp = BytesMut::new(bytes);
15967        #[allow(clippy::absurd_extreme_comparisons)]
15968        #[allow(unused_comparisons)]
15969        if __tmp.remaining() < Self::ENCODED_LEN {
15970            panic!(
15971                "buffer is too small (need {} bytes, but got {})",
15972                Self::ENCODED_LEN,
15973                __tmp.remaining(),
15974            )
15975        }
15976        __tmp.put_u64_le(self.time_usec);
15977        __tmp.put_u32_le(self.integration_time_us);
15978        __tmp.put_f32_le(self.integrated_x);
15979        __tmp.put_f32_le(self.integrated_y);
15980        __tmp.put_f32_le(self.integrated_xgyro);
15981        __tmp.put_f32_le(self.integrated_ygyro);
15982        __tmp.put_f32_le(self.integrated_zgyro);
15983        __tmp.put_u32_le(self.time_delta_distance_us);
15984        __tmp.put_f32_le(self.distance);
15985        __tmp.put_i16_le(self.temperature);
15986        __tmp.put_u8(self.sensor_id);
15987        __tmp.put_u8(self.quality);
15988        if matches!(version, MavlinkVersion::V2) {
15989            let len = __tmp.len();
15990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15991        } else {
15992            __tmp.len()
15993        }
15994    }
15995}
15996#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15997#[doc = ""]
15998#[doc = "ID: 92"]
15999#[derive(Debug, Clone, PartialEq)]
16000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16002#[cfg_attr(feature = "ts", derive(TS))]
16003#[cfg_attr(feature = "ts", ts(export))]
16004pub struct HIL_RC_INPUTS_RAW_DATA {
16005    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16006    pub time_usec: u64,
16007    #[doc = "RC channel 1 value"]
16008    pub chan1_raw: u16,
16009    #[doc = "RC channel 2 value"]
16010    pub chan2_raw: u16,
16011    #[doc = "RC channel 3 value"]
16012    pub chan3_raw: u16,
16013    #[doc = "RC channel 4 value"]
16014    pub chan4_raw: u16,
16015    #[doc = "RC channel 5 value"]
16016    pub chan5_raw: u16,
16017    #[doc = "RC channel 6 value"]
16018    pub chan6_raw: u16,
16019    #[doc = "RC channel 7 value"]
16020    pub chan7_raw: u16,
16021    #[doc = "RC channel 8 value"]
16022    pub chan8_raw: u16,
16023    #[doc = "RC channel 9 value"]
16024    pub chan9_raw: u16,
16025    #[doc = "RC channel 10 value"]
16026    pub chan10_raw: u16,
16027    #[doc = "RC channel 11 value"]
16028    pub chan11_raw: u16,
16029    #[doc = "RC channel 12 value"]
16030    pub chan12_raw: u16,
16031    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16032    pub rssi: u8,
16033}
16034impl HIL_RC_INPUTS_RAW_DATA {
16035    pub const ENCODED_LEN: usize = 33usize;
16036    pub const DEFAULT: Self = Self {
16037        time_usec: 0_u64,
16038        chan1_raw: 0_u16,
16039        chan2_raw: 0_u16,
16040        chan3_raw: 0_u16,
16041        chan4_raw: 0_u16,
16042        chan5_raw: 0_u16,
16043        chan6_raw: 0_u16,
16044        chan7_raw: 0_u16,
16045        chan8_raw: 0_u16,
16046        chan9_raw: 0_u16,
16047        chan10_raw: 0_u16,
16048        chan11_raw: 0_u16,
16049        chan12_raw: 0_u16,
16050        rssi: 0_u8,
16051    };
16052    #[cfg(feature = "arbitrary")]
16053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16054        use arbitrary::{Arbitrary, Unstructured};
16055        let mut buf = [0u8; 1024];
16056        rng.fill_bytes(&mut buf);
16057        let mut unstructured = Unstructured::new(&buf);
16058        Self::arbitrary(&mut unstructured).unwrap_or_default()
16059    }
16060}
16061impl Default for HIL_RC_INPUTS_RAW_DATA {
16062    fn default() -> Self {
16063        Self::DEFAULT.clone()
16064    }
16065}
16066impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16067    type Message = MavMessage;
16068    const ID: u32 = 92u32;
16069    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16070    const EXTRA_CRC: u8 = 54u8;
16071    const ENCODED_LEN: usize = 33usize;
16072    fn deser(
16073        _version: MavlinkVersion,
16074        __input: &[u8],
16075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16076        let avail_len = __input.len();
16077        let mut payload_buf = [0; Self::ENCODED_LEN];
16078        let mut buf = if avail_len < Self::ENCODED_LEN {
16079            payload_buf[0..avail_len].copy_from_slice(__input);
16080            Bytes::new(&payload_buf)
16081        } else {
16082            Bytes::new(__input)
16083        };
16084        let mut __struct = Self::default();
16085        __struct.time_usec = buf.get_u64_le();
16086        __struct.chan1_raw = buf.get_u16_le();
16087        __struct.chan2_raw = buf.get_u16_le();
16088        __struct.chan3_raw = buf.get_u16_le();
16089        __struct.chan4_raw = buf.get_u16_le();
16090        __struct.chan5_raw = buf.get_u16_le();
16091        __struct.chan6_raw = buf.get_u16_le();
16092        __struct.chan7_raw = buf.get_u16_le();
16093        __struct.chan8_raw = buf.get_u16_le();
16094        __struct.chan9_raw = buf.get_u16_le();
16095        __struct.chan10_raw = buf.get_u16_le();
16096        __struct.chan11_raw = buf.get_u16_le();
16097        __struct.chan12_raw = buf.get_u16_le();
16098        __struct.rssi = buf.get_u8();
16099        Ok(__struct)
16100    }
16101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16102        let mut __tmp = BytesMut::new(bytes);
16103        #[allow(clippy::absurd_extreme_comparisons)]
16104        #[allow(unused_comparisons)]
16105        if __tmp.remaining() < Self::ENCODED_LEN {
16106            panic!(
16107                "buffer is too small (need {} bytes, but got {})",
16108                Self::ENCODED_LEN,
16109                __tmp.remaining(),
16110            )
16111        }
16112        __tmp.put_u64_le(self.time_usec);
16113        __tmp.put_u16_le(self.chan1_raw);
16114        __tmp.put_u16_le(self.chan2_raw);
16115        __tmp.put_u16_le(self.chan3_raw);
16116        __tmp.put_u16_le(self.chan4_raw);
16117        __tmp.put_u16_le(self.chan5_raw);
16118        __tmp.put_u16_le(self.chan6_raw);
16119        __tmp.put_u16_le(self.chan7_raw);
16120        __tmp.put_u16_le(self.chan8_raw);
16121        __tmp.put_u16_le(self.chan9_raw);
16122        __tmp.put_u16_le(self.chan10_raw);
16123        __tmp.put_u16_le(self.chan11_raw);
16124        __tmp.put_u16_le(self.chan12_raw);
16125        __tmp.put_u8(self.rssi);
16126        if matches!(version, MavlinkVersion::V2) {
16127            let len = __tmp.len();
16128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16129        } else {
16130            __tmp.len()
16131        }
16132    }
16133}
16134#[doc = "The IMU readings in SI units in NED body frame."]
16135#[doc = ""]
16136#[doc = "ID: 107"]
16137#[derive(Debug, Clone, PartialEq)]
16138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16140#[cfg_attr(feature = "ts", derive(TS))]
16141#[cfg_attr(feature = "ts", ts(export))]
16142pub struct HIL_SENSOR_DATA {
16143    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16144    pub time_usec: u64,
16145    #[doc = "X acceleration"]
16146    pub xacc: f32,
16147    #[doc = "Y acceleration"]
16148    pub yacc: f32,
16149    #[doc = "Z acceleration"]
16150    pub zacc: f32,
16151    #[doc = "Angular speed around X axis in body frame"]
16152    pub xgyro: f32,
16153    #[doc = "Angular speed around Y axis in body frame"]
16154    pub ygyro: f32,
16155    #[doc = "Angular speed around Z axis in body frame"]
16156    pub zgyro: f32,
16157    #[doc = "X Magnetic field"]
16158    pub xmag: f32,
16159    #[doc = "Y Magnetic field"]
16160    pub ymag: f32,
16161    #[doc = "Z Magnetic field"]
16162    pub zmag: f32,
16163    #[doc = "Absolute pressure"]
16164    pub abs_pressure: f32,
16165    #[doc = "Differential pressure (airspeed)"]
16166    pub diff_pressure: f32,
16167    #[doc = "Altitude calculated from pressure"]
16168    pub pressure_alt: f32,
16169    #[doc = "Temperature"]
16170    pub temperature: f32,
16171    #[doc = "Bitmap for fields that have updated since last message"]
16172    pub fields_updated: HilSensorUpdatedFlags,
16173    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16175    pub id: u8,
16176}
16177impl HIL_SENSOR_DATA {
16178    pub const ENCODED_LEN: usize = 65usize;
16179    pub const DEFAULT: Self = Self {
16180        time_usec: 0_u64,
16181        xacc: 0.0_f32,
16182        yacc: 0.0_f32,
16183        zacc: 0.0_f32,
16184        xgyro: 0.0_f32,
16185        ygyro: 0.0_f32,
16186        zgyro: 0.0_f32,
16187        xmag: 0.0_f32,
16188        ymag: 0.0_f32,
16189        zmag: 0.0_f32,
16190        abs_pressure: 0.0_f32,
16191        diff_pressure: 0.0_f32,
16192        pressure_alt: 0.0_f32,
16193        temperature: 0.0_f32,
16194        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16195        id: 0_u8,
16196    };
16197    #[cfg(feature = "arbitrary")]
16198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16199        use arbitrary::{Arbitrary, Unstructured};
16200        let mut buf = [0u8; 1024];
16201        rng.fill_bytes(&mut buf);
16202        let mut unstructured = Unstructured::new(&buf);
16203        Self::arbitrary(&mut unstructured).unwrap_or_default()
16204    }
16205}
16206impl Default for HIL_SENSOR_DATA {
16207    fn default() -> Self {
16208        Self::DEFAULT.clone()
16209    }
16210}
16211impl MessageData for HIL_SENSOR_DATA {
16212    type Message = MavMessage;
16213    const ID: u32 = 107u32;
16214    const NAME: &'static str = "HIL_SENSOR";
16215    const EXTRA_CRC: u8 = 108u8;
16216    const ENCODED_LEN: usize = 65usize;
16217    fn deser(
16218        _version: MavlinkVersion,
16219        __input: &[u8],
16220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16221        let avail_len = __input.len();
16222        let mut payload_buf = [0; Self::ENCODED_LEN];
16223        let mut buf = if avail_len < Self::ENCODED_LEN {
16224            payload_buf[0..avail_len].copy_from_slice(__input);
16225            Bytes::new(&payload_buf)
16226        } else {
16227            Bytes::new(__input)
16228        };
16229        let mut __struct = Self::default();
16230        __struct.time_usec = buf.get_u64_le();
16231        __struct.xacc = buf.get_f32_le();
16232        __struct.yacc = buf.get_f32_le();
16233        __struct.zacc = buf.get_f32_le();
16234        __struct.xgyro = buf.get_f32_le();
16235        __struct.ygyro = buf.get_f32_le();
16236        __struct.zgyro = buf.get_f32_le();
16237        __struct.xmag = buf.get_f32_le();
16238        __struct.ymag = buf.get_f32_le();
16239        __struct.zmag = buf.get_f32_le();
16240        __struct.abs_pressure = buf.get_f32_le();
16241        __struct.diff_pressure = buf.get_f32_le();
16242        __struct.pressure_alt = buf.get_f32_le();
16243        __struct.temperature = buf.get_f32_le();
16244        let tmp = buf.get_u32_le();
16245        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16246            tmp & HilSensorUpdatedFlags::all().bits(),
16247        )
16248        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16249            flag_type: "HilSensorUpdatedFlags",
16250            value: tmp as u32,
16251        })?;
16252        __struct.id = buf.get_u8();
16253        Ok(__struct)
16254    }
16255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16256        let mut __tmp = BytesMut::new(bytes);
16257        #[allow(clippy::absurd_extreme_comparisons)]
16258        #[allow(unused_comparisons)]
16259        if __tmp.remaining() < Self::ENCODED_LEN {
16260            panic!(
16261                "buffer is too small (need {} bytes, but got {})",
16262                Self::ENCODED_LEN,
16263                __tmp.remaining(),
16264            )
16265        }
16266        __tmp.put_u64_le(self.time_usec);
16267        __tmp.put_f32_le(self.xacc);
16268        __tmp.put_f32_le(self.yacc);
16269        __tmp.put_f32_le(self.zacc);
16270        __tmp.put_f32_le(self.xgyro);
16271        __tmp.put_f32_le(self.ygyro);
16272        __tmp.put_f32_le(self.zgyro);
16273        __tmp.put_f32_le(self.xmag);
16274        __tmp.put_f32_le(self.ymag);
16275        __tmp.put_f32_le(self.zmag);
16276        __tmp.put_f32_le(self.abs_pressure);
16277        __tmp.put_f32_le(self.diff_pressure);
16278        __tmp.put_f32_le(self.pressure_alt);
16279        __tmp.put_f32_le(self.temperature);
16280        __tmp.put_u32_le(self.fields_updated.bits());
16281        if matches!(version, MavlinkVersion::V2) {
16282            __tmp.put_u8(self.id);
16283            let len = __tmp.len();
16284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16285        } else {
16286            __tmp.len()
16287        }
16288    }
16289}
16290#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16291#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16292#[doc = ""]
16293#[doc = "ID: 90"]
16294#[derive(Debug, Clone, PartialEq)]
16295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16297#[cfg_attr(feature = "ts", derive(TS))]
16298#[cfg_attr(feature = "ts", ts(export))]
16299pub struct HIL_STATE_DATA {
16300    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16301    pub time_usec: u64,
16302    #[doc = "Roll angle"]
16303    pub roll: f32,
16304    #[doc = "Pitch angle"]
16305    pub pitch: f32,
16306    #[doc = "Yaw angle"]
16307    pub yaw: f32,
16308    #[doc = "Body frame roll / phi angular speed"]
16309    pub rollspeed: f32,
16310    #[doc = "Body frame pitch / theta angular speed"]
16311    pub pitchspeed: f32,
16312    #[doc = "Body frame yaw / psi angular speed"]
16313    pub yawspeed: f32,
16314    #[doc = "Latitude"]
16315    pub lat: i32,
16316    #[doc = "Longitude"]
16317    pub lon: i32,
16318    #[doc = "Altitude"]
16319    pub alt: i32,
16320    #[doc = "Ground X Speed (Latitude)"]
16321    pub vx: i16,
16322    #[doc = "Ground Y Speed (Longitude)"]
16323    pub vy: i16,
16324    #[doc = "Ground Z Speed (Altitude)"]
16325    pub vz: i16,
16326    #[doc = "X acceleration"]
16327    pub xacc: i16,
16328    #[doc = "Y acceleration"]
16329    pub yacc: i16,
16330    #[doc = "Z acceleration"]
16331    pub zacc: i16,
16332}
16333impl HIL_STATE_DATA {
16334    pub const ENCODED_LEN: usize = 56usize;
16335    pub const DEFAULT: Self = Self {
16336        time_usec: 0_u64,
16337        roll: 0.0_f32,
16338        pitch: 0.0_f32,
16339        yaw: 0.0_f32,
16340        rollspeed: 0.0_f32,
16341        pitchspeed: 0.0_f32,
16342        yawspeed: 0.0_f32,
16343        lat: 0_i32,
16344        lon: 0_i32,
16345        alt: 0_i32,
16346        vx: 0_i16,
16347        vy: 0_i16,
16348        vz: 0_i16,
16349        xacc: 0_i16,
16350        yacc: 0_i16,
16351        zacc: 0_i16,
16352    };
16353    #[cfg(feature = "arbitrary")]
16354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16355        use arbitrary::{Arbitrary, Unstructured};
16356        let mut buf = [0u8; 1024];
16357        rng.fill_bytes(&mut buf);
16358        let mut unstructured = Unstructured::new(&buf);
16359        Self::arbitrary(&mut unstructured).unwrap_or_default()
16360    }
16361}
16362impl Default for HIL_STATE_DATA {
16363    fn default() -> Self {
16364        Self::DEFAULT.clone()
16365    }
16366}
16367impl MessageData for HIL_STATE_DATA {
16368    type Message = MavMessage;
16369    const ID: u32 = 90u32;
16370    const NAME: &'static str = "HIL_STATE";
16371    const EXTRA_CRC: u8 = 183u8;
16372    const ENCODED_LEN: usize = 56usize;
16373    fn deser(
16374        _version: MavlinkVersion,
16375        __input: &[u8],
16376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16377        let avail_len = __input.len();
16378        let mut payload_buf = [0; Self::ENCODED_LEN];
16379        let mut buf = if avail_len < Self::ENCODED_LEN {
16380            payload_buf[0..avail_len].copy_from_slice(__input);
16381            Bytes::new(&payload_buf)
16382        } else {
16383            Bytes::new(__input)
16384        };
16385        let mut __struct = Self::default();
16386        __struct.time_usec = buf.get_u64_le();
16387        __struct.roll = buf.get_f32_le();
16388        __struct.pitch = buf.get_f32_le();
16389        __struct.yaw = buf.get_f32_le();
16390        __struct.rollspeed = buf.get_f32_le();
16391        __struct.pitchspeed = buf.get_f32_le();
16392        __struct.yawspeed = buf.get_f32_le();
16393        __struct.lat = buf.get_i32_le();
16394        __struct.lon = buf.get_i32_le();
16395        __struct.alt = buf.get_i32_le();
16396        __struct.vx = buf.get_i16_le();
16397        __struct.vy = buf.get_i16_le();
16398        __struct.vz = buf.get_i16_le();
16399        __struct.xacc = buf.get_i16_le();
16400        __struct.yacc = buf.get_i16_le();
16401        __struct.zacc = buf.get_i16_le();
16402        Ok(__struct)
16403    }
16404    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16405        let mut __tmp = BytesMut::new(bytes);
16406        #[allow(clippy::absurd_extreme_comparisons)]
16407        #[allow(unused_comparisons)]
16408        if __tmp.remaining() < Self::ENCODED_LEN {
16409            panic!(
16410                "buffer is too small (need {} bytes, but got {})",
16411                Self::ENCODED_LEN,
16412                __tmp.remaining(),
16413            )
16414        }
16415        __tmp.put_u64_le(self.time_usec);
16416        __tmp.put_f32_le(self.roll);
16417        __tmp.put_f32_le(self.pitch);
16418        __tmp.put_f32_le(self.yaw);
16419        __tmp.put_f32_le(self.rollspeed);
16420        __tmp.put_f32_le(self.pitchspeed);
16421        __tmp.put_f32_le(self.yawspeed);
16422        __tmp.put_i32_le(self.lat);
16423        __tmp.put_i32_le(self.lon);
16424        __tmp.put_i32_le(self.alt);
16425        __tmp.put_i16_le(self.vx);
16426        __tmp.put_i16_le(self.vy);
16427        __tmp.put_i16_le(self.vz);
16428        __tmp.put_i16_le(self.xacc);
16429        __tmp.put_i16_le(self.yacc);
16430        __tmp.put_i16_le(self.zacc);
16431        if matches!(version, MavlinkVersion::V2) {
16432            let len = __tmp.len();
16433            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16434        } else {
16435            __tmp.len()
16436        }
16437    }
16438}
16439#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16440#[doc = ""]
16441#[doc = "ID: 115"]
16442#[derive(Debug, Clone, PartialEq)]
16443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16445#[cfg_attr(feature = "ts", derive(TS))]
16446#[cfg_attr(feature = "ts", ts(export))]
16447pub struct HIL_STATE_QUATERNION_DATA {
16448    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16449    pub time_usec: u64,
16450    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16451    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16452    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16453    pub attitude_quaternion: [f32; 4],
16454    #[doc = "Body frame roll / phi angular speed"]
16455    pub rollspeed: f32,
16456    #[doc = "Body frame pitch / theta angular speed"]
16457    pub pitchspeed: f32,
16458    #[doc = "Body frame yaw / psi angular speed"]
16459    pub yawspeed: f32,
16460    #[doc = "Latitude"]
16461    pub lat: i32,
16462    #[doc = "Longitude"]
16463    pub lon: i32,
16464    #[doc = "Altitude"]
16465    pub alt: i32,
16466    #[doc = "Ground X Speed (Latitude)"]
16467    pub vx: i16,
16468    #[doc = "Ground Y Speed (Longitude)"]
16469    pub vy: i16,
16470    #[doc = "Ground Z Speed (Altitude)"]
16471    pub vz: i16,
16472    #[doc = "Indicated airspeed"]
16473    pub ind_airspeed: u16,
16474    #[doc = "True airspeed"]
16475    pub true_airspeed: u16,
16476    #[doc = "X acceleration"]
16477    pub xacc: i16,
16478    #[doc = "Y acceleration"]
16479    pub yacc: i16,
16480    #[doc = "Z acceleration"]
16481    pub zacc: i16,
16482}
16483impl HIL_STATE_QUATERNION_DATA {
16484    pub const ENCODED_LEN: usize = 64usize;
16485    pub const DEFAULT: Self = Self {
16486        time_usec: 0_u64,
16487        attitude_quaternion: [0.0_f32; 4usize],
16488        rollspeed: 0.0_f32,
16489        pitchspeed: 0.0_f32,
16490        yawspeed: 0.0_f32,
16491        lat: 0_i32,
16492        lon: 0_i32,
16493        alt: 0_i32,
16494        vx: 0_i16,
16495        vy: 0_i16,
16496        vz: 0_i16,
16497        ind_airspeed: 0_u16,
16498        true_airspeed: 0_u16,
16499        xacc: 0_i16,
16500        yacc: 0_i16,
16501        zacc: 0_i16,
16502    };
16503    #[cfg(feature = "arbitrary")]
16504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16505        use arbitrary::{Arbitrary, Unstructured};
16506        let mut buf = [0u8; 1024];
16507        rng.fill_bytes(&mut buf);
16508        let mut unstructured = Unstructured::new(&buf);
16509        Self::arbitrary(&mut unstructured).unwrap_or_default()
16510    }
16511}
16512impl Default for HIL_STATE_QUATERNION_DATA {
16513    fn default() -> Self {
16514        Self::DEFAULT.clone()
16515    }
16516}
16517impl MessageData for HIL_STATE_QUATERNION_DATA {
16518    type Message = MavMessage;
16519    const ID: u32 = 115u32;
16520    const NAME: &'static str = "HIL_STATE_QUATERNION";
16521    const EXTRA_CRC: u8 = 4u8;
16522    const ENCODED_LEN: usize = 64usize;
16523    fn deser(
16524        _version: MavlinkVersion,
16525        __input: &[u8],
16526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16527        let avail_len = __input.len();
16528        let mut payload_buf = [0; Self::ENCODED_LEN];
16529        let mut buf = if avail_len < Self::ENCODED_LEN {
16530            payload_buf[0..avail_len].copy_from_slice(__input);
16531            Bytes::new(&payload_buf)
16532        } else {
16533            Bytes::new(__input)
16534        };
16535        let mut __struct = Self::default();
16536        __struct.time_usec = buf.get_u64_le();
16537        for v in &mut __struct.attitude_quaternion {
16538            let val = buf.get_f32_le();
16539            *v = val;
16540        }
16541        __struct.rollspeed = buf.get_f32_le();
16542        __struct.pitchspeed = buf.get_f32_le();
16543        __struct.yawspeed = buf.get_f32_le();
16544        __struct.lat = buf.get_i32_le();
16545        __struct.lon = buf.get_i32_le();
16546        __struct.alt = buf.get_i32_le();
16547        __struct.vx = buf.get_i16_le();
16548        __struct.vy = buf.get_i16_le();
16549        __struct.vz = buf.get_i16_le();
16550        __struct.ind_airspeed = buf.get_u16_le();
16551        __struct.true_airspeed = buf.get_u16_le();
16552        __struct.xacc = buf.get_i16_le();
16553        __struct.yacc = buf.get_i16_le();
16554        __struct.zacc = buf.get_i16_le();
16555        Ok(__struct)
16556    }
16557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16558        let mut __tmp = BytesMut::new(bytes);
16559        #[allow(clippy::absurd_extreme_comparisons)]
16560        #[allow(unused_comparisons)]
16561        if __tmp.remaining() < Self::ENCODED_LEN {
16562            panic!(
16563                "buffer is too small (need {} bytes, but got {})",
16564                Self::ENCODED_LEN,
16565                __tmp.remaining(),
16566            )
16567        }
16568        __tmp.put_u64_le(self.time_usec);
16569        for val in &self.attitude_quaternion {
16570            __tmp.put_f32_le(*val);
16571        }
16572        __tmp.put_f32_le(self.rollspeed);
16573        __tmp.put_f32_le(self.pitchspeed);
16574        __tmp.put_f32_le(self.yawspeed);
16575        __tmp.put_i32_le(self.lat);
16576        __tmp.put_i32_le(self.lon);
16577        __tmp.put_i32_le(self.alt);
16578        __tmp.put_i16_le(self.vx);
16579        __tmp.put_i16_le(self.vy);
16580        __tmp.put_i16_le(self.vz);
16581        __tmp.put_u16_le(self.ind_airspeed);
16582        __tmp.put_u16_le(self.true_airspeed);
16583        __tmp.put_i16_le(self.xacc);
16584        __tmp.put_i16_le(self.yacc);
16585        __tmp.put_i16_le(self.zacc);
16586        if matches!(version, MavlinkVersion::V2) {
16587            let len = __tmp.len();
16588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16589        } else {
16590            __tmp.len()
16591        }
16592    }
16593}
16594#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16595#[doc = ""]
16596#[doc = "ID: 242"]
16597#[derive(Debug, Clone, PartialEq)]
16598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16600#[cfg_attr(feature = "ts", derive(TS))]
16601#[cfg_attr(feature = "ts", ts(export))]
16602pub struct HOME_POSITION_DATA {
16603    #[doc = "Latitude (WGS84)"]
16604    pub latitude: i32,
16605    #[doc = "Longitude (WGS84)"]
16606    pub longitude: i32,
16607    #[doc = "Altitude (MSL). Positive for up."]
16608    pub altitude: i32,
16609    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16610    pub x: f32,
16611    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16612    pub y: f32,
16613    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16614    pub z: f32,
16615    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16616    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16617    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16618    pub q: [f32; 4],
16619    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16620    pub approach_x: f32,
16621    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16622    pub approach_y: f32,
16623    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16624    pub approach_z: f32,
16625    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16626    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16627    pub time_usec: u64,
16628}
16629impl HOME_POSITION_DATA {
16630    pub const ENCODED_LEN: usize = 60usize;
16631    pub const DEFAULT: Self = Self {
16632        latitude: 0_i32,
16633        longitude: 0_i32,
16634        altitude: 0_i32,
16635        x: 0.0_f32,
16636        y: 0.0_f32,
16637        z: 0.0_f32,
16638        q: [0.0_f32; 4usize],
16639        approach_x: 0.0_f32,
16640        approach_y: 0.0_f32,
16641        approach_z: 0.0_f32,
16642        time_usec: 0_u64,
16643    };
16644    #[cfg(feature = "arbitrary")]
16645    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16646        use arbitrary::{Arbitrary, Unstructured};
16647        let mut buf = [0u8; 1024];
16648        rng.fill_bytes(&mut buf);
16649        let mut unstructured = Unstructured::new(&buf);
16650        Self::arbitrary(&mut unstructured).unwrap_or_default()
16651    }
16652}
16653impl Default for HOME_POSITION_DATA {
16654    fn default() -> Self {
16655        Self::DEFAULT.clone()
16656    }
16657}
16658impl MessageData for HOME_POSITION_DATA {
16659    type Message = MavMessage;
16660    const ID: u32 = 242u32;
16661    const NAME: &'static str = "HOME_POSITION";
16662    const EXTRA_CRC: u8 = 104u8;
16663    const ENCODED_LEN: usize = 60usize;
16664    fn deser(
16665        _version: MavlinkVersion,
16666        __input: &[u8],
16667    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16668        let avail_len = __input.len();
16669        let mut payload_buf = [0; Self::ENCODED_LEN];
16670        let mut buf = if avail_len < Self::ENCODED_LEN {
16671            payload_buf[0..avail_len].copy_from_slice(__input);
16672            Bytes::new(&payload_buf)
16673        } else {
16674            Bytes::new(__input)
16675        };
16676        let mut __struct = Self::default();
16677        __struct.latitude = buf.get_i32_le();
16678        __struct.longitude = buf.get_i32_le();
16679        __struct.altitude = buf.get_i32_le();
16680        __struct.x = buf.get_f32_le();
16681        __struct.y = buf.get_f32_le();
16682        __struct.z = buf.get_f32_le();
16683        for v in &mut __struct.q {
16684            let val = buf.get_f32_le();
16685            *v = val;
16686        }
16687        __struct.approach_x = buf.get_f32_le();
16688        __struct.approach_y = buf.get_f32_le();
16689        __struct.approach_z = buf.get_f32_le();
16690        __struct.time_usec = buf.get_u64_le();
16691        Ok(__struct)
16692    }
16693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16694        let mut __tmp = BytesMut::new(bytes);
16695        #[allow(clippy::absurd_extreme_comparisons)]
16696        #[allow(unused_comparisons)]
16697        if __tmp.remaining() < Self::ENCODED_LEN {
16698            panic!(
16699                "buffer is too small (need {} bytes, but got {})",
16700                Self::ENCODED_LEN,
16701                __tmp.remaining(),
16702            )
16703        }
16704        __tmp.put_i32_le(self.latitude);
16705        __tmp.put_i32_le(self.longitude);
16706        __tmp.put_i32_le(self.altitude);
16707        __tmp.put_f32_le(self.x);
16708        __tmp.put_f32_le(self.y);
16709        __tmp.put_f32_le(self.z);
16710        for val in &self.q {
16711            __tmp.put_f32_le(*val);
16712        }
16713        __tmp.put_f32_le(self.approach_x);
16714        __tmp.put_f32_le(self.approach_y);
16715        __tmp.put_f32_le(self.approach_z);
16716        if matches!(version, MavlinkVersion::V2) {
16717            __tmp.put_u64_le(self.time_usec);
16718            let len = __tmp.len();
16719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16720        } else {
16721            __tmp.len()
16722        }
16723    }
16724}
16725#[doc = "Temperature and humidity from hygrometer."]
16726#[doc = ""]
16727#[doc = "ID: 12920"]
16728#[derive(Debug, Clone, PartialEq)]
16729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16731#[cfg_attr(feature = "ts", derive(TS))]
16732#[cfg_attr(feature = "ts", ts(export))]
16733pub struct HYGROMETER_SENSOR_DATA {
16734    #[doc = "Temperature"]
16735    pub temperature: i16,
16736    #[doc = "Humidity"]
16737    pub humidity: u16,
16738    #[doc = "Hygrometer ID"]
16739    pub id: u8,
16740}
16741impl HYGROMETER_SENSOR_DATA {
16742    pub const ENCODED_LEN: usize = 5usize;
16743    pub const DEFAULT: Self = Self {
16744        temperature: 0_i16,
16745        humidity: 0_u16,
16746        id: 0_u8,
16747    };
16748    #[cfg(feature = "arbitrary")]
16749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16750        use arbitrary::{Arbitrary, Unstructured};
16751        let mut buf = [0u8; 1024];
16752        rng.fill_bytes(&mut buf);
16753        let mut unstructured = Unstructured::new(&buf);
16754        Self::arbitrary(&mut unstructured).unwrap_or_default()
16755    }
16756}
16757impl Default for HYGROMETER_SENSOR_DATA {
16758    fn default() -> Self {
16759        Self::DEFAULT.clone()
16760    }
16761}
16762impl MessageData for HYGROMETER_SENSOR_DATA {
16763    type Message = MavMessage;
16764    const ID: u32 = 12920u32;
16765    const NAME: &'static str = "HYGROMETER_SENSOR";
16766    const EXTRA_CRC: u8 = 20u8;
16767    const ENCODED_LEN: usize = 5usize;
16768    fn deser(
16769        _version: MavlinkVersion,
16770        __input: &[u8],
16771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16772        let avail_len = __input.len();
16773        let mut payload_buf = [0; Self::ENCODED_LEN];
16774        let mut buf = if avail_len < Self::ENCODED_LEN {
16775            payload_buf[0..avail_len].copy_from_slice(__input);
16776            Bytes::new(&payload_buf)
16777        } else {
16778            Bytes::new(__input)
16779        };
16780        let mut __struct = Self::default();
16781        __struct.temperature = buf.get_i16_le();
16782        __struct.humidity = buf.get_u16_le();
16783        __struct.id = buf.get_u8();
16784        Ok(__struct)
16785    }
16786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16787        let mut __tmp = BytesMut::new(bytes);
16788        #[allow(clippy::absurd_extreme_comparisons)]
16789        #[allow(unused_comparisons)]
16790        if __tmp.remaining() < Self::ENCODED_LEN {
16791            panic!(
16792                "buffer is too small (need {} bytes, but got {})",
16793                Self::ENCODED_LEN,
16794                __tmp.remaining(),
16795            )
16796        }
16797        __tmp.put_i16_le(self.temperature);
16798        __tmp.put_u16_le(self.humidity);
16799        __tmp.put_u8(self.id);
16800        if matches!(version, MavlinkVersion::V2) {
16801            let len = __tmp.len();
16802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16803        } else {
16804            __tmp.len()
16805        }
16806    }
16807}
16808#[doc = "Illuminator status."]
16809#[doc = ""]
16810#[doc = "ID: 440"]
16811#[derive(Debug, Clone, PartialEq)]
16812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16814#[cfg_attr(feature = "ts", derive(TS))]
16815#[cfg_attr(feature = "ts", ts(export))]
16816pub struct ILLUMINATOR_STATUS_DATA {
16817    #[doc = "Time since the start-up of the illuminator in ms"]
16818    pub uptime_ms: u32,
16819    #[doc = "Errors"]
16820    pub error_status: IlluminatorErrorFlags,
16821    #[doc = "Illuminator brightness"]
16822    pub brightness: f32,
16823    #[doc = "Illuminator strobing period in seconds"]
16824    pub strobe_period: f32,
16825    #[doc = "Illuminator strobing duty cycle"]
16826    pub strobe_duty_cycle: f32,
16827    #[doc = "Temperature in Celsius"]
16828    pub temp_c: f32,
16829    #[doc = "Minimum strobing period in seconds"]
16830    pub min_strobe_period: f32,
16831    #[doc = "Maximum strobing period in seconds"]
16832    pub max_strobe_period: f32,
16833    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16834    pub enable: u8,
16835    #[doc = "Supported illuminator modes"]
16836    pub mode_bitmask: IlluminatorMode,
16837    #[doc = "Illuminator mode"]
16838    pub mode: IlluminatorMode,
16839}
16840impl ILLUMINATOR_STATUS_DATA {
16841    pub const ENCODED_LEN: usize = 35usize;
16842    pub const DEFAULT: Self = Self {
16843        uptime_ms: 0_u32,
16844        error_status: IlluminatorErrorFlags::DEFAULT,
16845        brightness: 0.0_f32,
16846        strobe_period: 0.0_f32,
16847        strobe_duty_cycle: 0.0_f32,
16848        temp_c: 0.0_f32,
16849        min_strobe_period: 0.0_f32,
16850        max_strobe_period: 0.0_f32,
16851        enable: 0_u8,
16852        mode_bitmask: IlluminatorMode::DEFAULT,
16853        mode: IlluminatorMode::DEFAULT,
16854    };
16855    #[cfg(feature = "arbitrary")]
16856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16857        use arbitrary::{Arbitrary, Unstructured};
16858        let mut buf = [0u8; 1024];
16859        rng.fill_bytes(&mut buf);
16860        let mut unstructured = Unstructured::new(&buf);
16861        Self::arbitrary(&mut unstructured).unwrap_or_default()
16862    }
16863}
16864impl Default for ILLUMINATOR_STATUS_DATA {
16865    fn default() -> Self {
16866        Self::DEFAULT.clone()
16867    }
16868}
16869impl MessageData for ILLUMINATOR_STATUS_DATA {
16870    type Message = MavMessage;
16871    const ID: u32 = 440u32;
16872    const NAME: &'static str = "ILLUMINATOR_STATUS";
16873    const EXTRA_CRC: u8 = 66u8;
16874    const ENCODED_LEN: usize = 35usize;
16875    fn deser(
16876        _version: MavlinkVersion,
16877        __input: &[u8],
16878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16879        let avail_len = __input.len();
16880        let mut payload_buf = [0; Self::ENCODED_LEN];
16881        let mut buf = if avail_len < Self::ENCODED_LEN {
16882            payload_buf[0..avail_len].copy_from_slice(__input);
16883            Bytes::new(&payload_buf)
16884        } else {
16885            Bytes::new(__input)
16886        };
16887        let mut __struct = Self::default();
16888        __struct.uptime_ms = buf.get_u32_le();
16889        let tmp = buf.get_u32_le();
16890        __struct.error_status = IlluminatorErrorFlags::from_bits(
16891            tmp & IlluminatorErrorFlags::all().bits(),
16892        )
16893        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16894            flag_type: "IlluminatorErrorFlags",
16895            value: tmp as u32,
16896        })?;
16897        __struct.brightness = buf.get_f32_le();
16898        __struct.strobe_period = buf.get_f32_le();
16899        __struct.strobe_duty_cycle = buf.get_f32_le();
16900        __struct.temp_c = buf.get_f32_le();
16901        __struct.min_strobe_period = buf.get_f32_le();
16902        __struct.max_strobe_period = buf.get_f32_le();
16903        __struct.enable = buf.get_u8();
16904        let tmp = buf.get_u8();
16905        __struct.mode_bitmask =
16906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16907                enum_type: "IlluminatorMode",
16908                value: tmp as u32,
16909            })?;
16910        let tmp = buf.get_u8();
16911        __struct.mode =
16912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16913                enum_type: "IlluminatorMode",
16914                value: tmp as u32,
16915            })?;
16916        Ok(__struct)
16917    }
16918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16919        let mut __tmp = BytesMut::new(bytes);
16920        #[allow(clippy::absurd_extreme_comparisons)]
16921        #[allow(unused_comparisons)]
16922        if __tmp.remaining() < Self::ENCODED_LEN {
16923            panic!(
16924                "buffer is too small (need {} bytes, but got {})",
16925                Self::ENCODED_LEN,
16926                __tmp.remaining(),
16927            )
16928        }
16929        __tmp.put_u32_le(self.uptime_ms);
16930        __tmp.put_u32_le(self.error_status.bits());
16931        __tmp.put_f32_le(self.brightness);
16932        __tmp.put_f32_le(self.strobe_period);
16933        __tmp.put_f32_le(self.strobe_duty_cycle);
16934        __tmp.put_f32_le(self.temp_c);
16935        __tmp.put_f32_le(self.min_strobe_period);
16936        __tmp.put_f32_le(self.max_strobe_period);
16937        __tmp.put_u8(self.enable);
16938        __tmp.put_u8(self.mode_bitmask as u8);
16939        __tmp.put_u8(self.mode as u8);
16940        if matches!(version, MavlinkVersion::V2) {
16941            let len = __tmp.len();
16942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16943        } else {
16944            __tmp.len()
16945        }
16946    }
16947}
16948#[doc = "Status of the Iridium SBD link."]
16949#[doc = ""]
16950#[doc = "ID: 335"]
16951#[derive(Debug, Clone, PartialEq)]
16952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16954#[cfg_attr(feature = "ts", derive(TS))]
16955#[cfg_attr(feature = "ts", ts(export))]
16956pub struct ISBD_LINK_STATUS_DATA {
16957    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16958    pub timestamp: u64,
16959    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16960    pub last_heartbeat: u64,
16961    #[doc = "Number of failed SBD sessions."]
16962    pub failed_sessions: u16,
16963    #[doc = "Number of successful SBD sessions."]
16964    pub successful_sessions: u16,
16965    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16966    pub signal_quality: u8,
16967    #[doc = "1: Ring call pending, 0: No call pending."]
16968    pub ring_pending: u8,
16969    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16970    pub tx_session_pending: u8,
16971    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16972    pub rx_session_pending: u8,
16973}
16974impl ISBD_LINK_STATUS_DATA {
16975    pub const ENCODED_LEN: usize = 24usize;
16976    pub const DEFAULT: Self = Self {
16977        timestamp: 0_u64,
16978        last_heartbeat: 0_u64,
16979        failed_sessions: 0_u16,
16980        successful_sessions: 0_u16,
16981        signal_quality: 0_u8,
16982        ring_pending: 0_u8,
16983        tx_session_pending: 0_u8,
16984        rx_session_pending: 0_u8,
16985    };
16986    #[cfg(feature = "arbitrary")]
16987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16988        use arbitrary::{Arbitrary, Unstructured};
16989        let mut buf = [0u8; 1024];
16990        rng.fill_bytes(&mut buf);
16991        let mut unstructured = Unstructured::new(&buf);
16992        Self::arbitrary(&mut unstructured).unwrap_or_default()
16993    }
16994}
16995impl Default for ISBD_LINK_STATUS_DATA {
16996    fn default() -> Self {
16997        Self::DEFAULT.clone()
16998    }
16999}
17000impl MessageData for ISBD_LINK_STATUS_DATA {
17001    type Message = MavMessage;
17002    const ID: u32 = 335u32;
17003    const NAME: &'static str = "ISBD_LINK_STATUS";
17004    const EXTRA_CRC: u8 = 225u8;
17005    const ENCODED_LEN: usize = 24usize;
17006    fn deser(
17007        _version: MavlinkVersion,
17008        __input: &[u8],
17009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17010        let avail_len = __input.len();
17011        let mut payload_buf = [0; Self::ENCODED_LEN];
17012        let mut buf = if avail_len < Self::ENCODED_LEN {
17013            payload_buf[0..avail_len].copy_from_slice(__input);
17014            Bytes::new(&payload_buf)
17015        } else {
17016            Bytes::new(__input)
17017        };
17018        let mut __struct = Self::default();
17019        __struct.timestamp = buf.get_u64_le();
17020        __struct.last_heartbeat = buf.get_u64_le();
17021        __struct.failed_sessions = buf.get_u16_le();
17022        __struct.successful_sessions = buf.get_u16_le();
17023        __struct.signal_quality = buf.get_u8();
17024        __struct.ring_pending = buf.get_u8();
17025        __struct.tx_session_pending = buf.get_u8();
17026        __struct.rx_session_pending = buf.get_u8();
17027        Ok(__struct)
17028    }
17029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17030        let mut __tmp = BytesMut::new(bytes);
17031        #[allow(clippy::absurd_extreme_comparisons)]
17032        #[allow(unused_comparisons)]
17033        if __tmp.remaining() < Self::ENCODED_LEN {
17034            panic!(
17035                "buffer is too small (need {} bytes, but got {})",
17036                Self::ENCODED_LEN,
17037                __tmp.remaining(),
17038            )
17039        }
17040        __tmp.put_u64_le(self.timestamp);
17041        __tmp.put_u64_le(self.last_heartbeat);
17042        __tmp.put_u16_le(self.failed_sessions);
17043        __tmp.put_u16_le(self.successful_sessions);
17044        __tmp.put_u8(self.signal_quality);
17045        __tmp.put_u8(self.ring_pending);
17046        __tmp.put_u8(self.tx_session_pending);
17047        __tmp.put_u8(self.rx_session_pending);
17048        if matches!(version, MavlinkVersion::V2) {
17049            let len = __tmp.len();
17050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17051        } else {
17052            __tmp.len()
17053        }
17054    }
17055}
17056#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17057#[doc = ""]
17058#[doc = "ID: 149"]
17059#[derive(Debug, Clone, PartialEq)]
17060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17062#[cfg_attr(feature = "ts", derive(TS))]
17063#[cfg_attr(feature = "ts", ts(export))]
17064pub struct LANDING_TARGET_DATA {
17065    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17066    pub time_usec: u64,
17067    #[doc = "X-axis angular offset of the target from the center of the image"]
17068    pub angle_x: f32,
17069    #[doc = "Y-axis angular offset of the target from the center of the image"]
17070    pub angle_y: f32,
17071    #[doc = "Distance to the target from the vehicle"]
17072    pub distance: f32,
17073    #[doc = "Size of target along x-axis"]
17074    pub size_x: f32,
17075    #[doc = "Size of target along y-axis"]
17076    pub size_y: f32,
17077    #[doc = "The ID of the target if multiple targets are present"]
17078    pub target_num: u8,
17079    #[doc = "Coordinate frame used for following fields."]
17080    pub frame: MavFrame,
17081    #[doc = "X Position of the landing target in MAV_FRAME"]
17082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17083    pub x: f32,
17084    #[doc = "Y Position of the landing target in MAV_FRAME"]
17085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17086    pub y: f32,
17087    #[doc = "Z Position of the landing target in MAV_FRAME"]
17088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17089    pub z: f32,
17090    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17091    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17093    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17094    pub q: [f32; 4],
17095    #[doc = "Type of landing target"]
17096    #[cfg_attr(feature = "serde", serde(default))]
17097    pub mavtype: LandingTargetType,
17098    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17100    pub position_valid: u8,
17101}
17102impl LANDING_TARGET_DATA {
17103    pub const ENCODED_LEN: usize = 60usize;
17104    pub const DEFAULT: Self = Self {
17105        time_usec: 0_u64,
17106        angle_x: 0.0_f32,
17107        angle_y: 0.0_f32,
17108        distance: 0.0_f32,
17109        size_x: 0.0_f32,
17110        size_y: 0.0_f32,
17111        target_num: 0_u8,
17112        frame: MavFrame::DEFAULT,
17113        x: 0.0_f32,
17114        y: 0.0_f32,
17115        z: 0.0_f32,
17116        q: [0.0_f32; 4usize],
17117        mavtype: LandingTargetType::DEFAULT,
17118        position_valid: 0_u8,
17119    };
17120    #[cfg(feature = "arbitrary")]
17121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17122        use arbitrary::{Arbitrary, Unstructured};
17123        let mut buf = [0u8; 1024];
17124        rng.fill_bytes(&mut buf);
17125        let mut unstructured = Unstructured::new(&buf);
17126        Self::arbitrary(&mut unstructured).unwrap_or_default()
17127    }
17128}
17129impl Default for LANDING_TARGET_DATA {
17130    fn default() -> Self {
17131        Self::DEFAULT.clone()
17132    }
17133}
17134impl MessageData for LANDING_TARGET_DATA {
17135    type Message = MavMessage;
17136    const ID: u32 = 149u32;
17137    const NAME: &'static str = "LANDING_TARGET";
17138    const EXTRA_CRC: u8 = 200u8;
17139    const ENCODED_LEN: usize = 60usize;
17140    fn deser(
17141        _version: MavlinkVersion,
17142        __input: &[u8],
17143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17144        let avail_len = __input.len();
17145        let mut payload_buf = [0; Self::ENCODED_LEN];
17146        let mut buf = if avail_len < Self::ENCODED_LEN {
17147            payload_buf[0..avail_len].copy_from_slice(__input);
17148            Bytes::new(&payload_buf)
17149        } else {
17150            Bytes::new(__input)
17151        };
17152        let mut __struct = Self::default();
17153        __struct.time_usec = buf.get_u64_le();
17154        __struct.angle_x = buf.get_f32_le();
17155        __struct.angle_y = buf.get_f32_le();
17156        __struct.distance = buf.get_f32_le();
17157        __struct.size_x = buf.get_f32_le();
17158        __struct.size_y = buf.get_f32_le();
17159        __struct.target_num = buf.get_u8();
17160        let tmp = buf.get_u8();
17161        __struct.frame =
17162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17163                enum_type: "MavFrame",
17164                value: tmp as u32,
17165            })?;
17166        __struct.x = buf.get_f32_le();
17167        __struct.y = buf.get_f32_le();
17168        __struct.z = buf.get_f32_le();
17169        for v in &mut __struct.q {
17170            let val = buf.get_f32_le();
17171            *v = val;
17172        }
17173        let tmp = buf.get_u8();
17174        __struct.mavtype =
17175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17176                enum_type: "LandingTargetType",
17177                value: tmp as u32,
17178            })?;
17179        __struct.position_valid = buf.get_u8();
17180        Ok(__struct)
17181    }
17182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17183        let mut __tmp = BytesMut::new(bytes);
17184        #[allow(clippy::absurd_extreme_comparisons)]
17185        #[allow(unused_comparisons)]
17186        if __tmp.remaining() < Self::ENCODED_LEN {
17187            panic!(
17188                "buffer is too small (need {} bytes, but got {})",
17189                Self::ENCODED_LEN,
17190                __tmp.remaining(),
17191            )
17192        }
17193        __tmp.put_u64_le(self.time_usec);
17194        __tmp.put_f32_le(self.angle_x);
17195        __tmp.put_f32_le(self.angle_y);
17196        __tmp.put_f32_le(self.distance);
17197        __tmp.put_f32_le(self.size_x);
17198        __tmp.put_f32_le(self.size_y);
17199        __tmp.put_u8(self.target_num);
17200        __tmp.put_u8(self.frame as u8);
17201        if matches!(version, MavlinkVersion::V2) {
17202            __tmp.put_f32_le(self.x);
17203            __tmp.put_f32_le(self.y);
17204            __tmp.put_f32_le(self.z);
17205            for val in &self.q {
17206                __tmp.put_f32_le(*val);
17207            }
17208            __tmp.put_u8(self.mavtype as u8);
17209            __tmp.put_u8(self.position_valid);
17210            let len = __tmp.len();
17211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17212        } else {
17213            __tmp.len()
17214        }
17215    }
17216}
17217#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17218#[doc = ""]
17219#[doc = "ID: 8"]
17220#[derive(Debug, Clone, PartialEq)]
17221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17223#[cfg_attr(feature = "ts", derive(TS))]
17224#[cfg_attr(feature = "ts", ts(export))]
17225pub struct LINK_NODE_STATUS_DATA {
17226    #[doc = "Timestamp (time since system boot)."]
17227    pub timestamp: u64,
17228    #[doc = "Transmit rate"]
17229    pub tx_rate: u32,
17230    #[doc = "Receive rate"]
17231    pub rx_rate: u32,
17232    #[doc = "Messages sent"]
17233    pub messages_sent: u32,
17234    #[doc = "Messages received (estimated from counting seq)"]
17235    pub messages_received: u32,
17236    #[doc = "Messages lost (estimated from counting seq)"]
17237    pub messages_lost: u32,
17238    #[doc = "Number of bytes that could not be parsed correctly."]
17239    pub rx_parse_err: u16,
17240    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17241    pub tx_overflows: u16,
17242    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17243    pub rx_overflows: u16,
17244    #[doc = "Remaining free transmit buffer space"]
17245    pub tx_buf: u8,
17246    #[doc = "Remaining free receive buffer space"]
17247    pub rx_buf: u8,
17248}
17249impl LINK_NODE_STATUS_DATA {
17250    pub const ENCODED_LEN: usize = 36usize;
17251    pub const DEFAULT: Self = Self {
17252        timestamp: 0_u64,
17253        tx_rate: 0_u32,
17254        rx_rate: 0_u32,
17255        messages_sent: 0_u32,
17256        messages_received: 0_u32,
17257        messages_lost: 0_u32,
17258        rx_parse_err: 0_u16,
17259        tx_overflows: 0_u16,
17260        rx_overflows: 0_u16,
17261        tx_buf: 0_u8,
17262        rx_buf: 0_u8,
17263    };
17264    #[cfg(feature = "arbitrary")]
17265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17266        use arbitrary::{Arbitrary, Unstructured};
17267        let mut buf = [0u8; 1024];
17268        rng.fill_bytes(&mut buf);
17269        let mut unstructured = Unstructured::new(&buf);
17270        Self::arbitrary(&mut unstructured).unwrap_or_default()
17271    }
17272}
17273impl Default for LINK_NODE_STATUS_DATA {
17274    fn default() -> Self {
17275        Self::DEFAULT.clone()
17276    }
17277}
17278impl MessageData for LINK_NODE_STATUS_DATA {
17279    type Message = MavMessage;
17280    const ID: u32 = 8u32;
17281    const NAME: &'static str = "LINK_NODE_STATUS";
17282    const EXTRA_CRC: u8 = 117u8;
17283    const ENCODED_LEN: usize = 36usize;
17284    fn deser(
17285        _version: MavlinkVersion,
17286        __input: &[u8],
17287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17288        let avail_len = __input.len();
17289        let mut payload_buf = [0; Self::ENCODED_LEN];
17290        let mut buf = if avail_len < Self::ENCODED_LEN {
17291            payload_buf[0..avail_len].copy_from_slice(__input);
17292            Bytes::new(&payload_buf)
17293        } else {
17294            Bytes::new(__input)
17295        };
17296        let mut __struct = Self::default();
17297        __struct.timestamp = buf.get_u64_le();
17298        __struct.tx_rate = buf.get_u32_le();
17299        __struct.rx_rate = buf.get_u32_le();
17300        __struct.messages_sent = buf.get_u32_le();
17301        __struct.messages_received = buf.get_u32_le();
17302        __struct.messages_lost = buf.get_u32_le();
17303        __struct.rx_parse_err = buf.get_u16_le();
17304        __struct.tx_overflows = buf.get_u16_le();
17305        __struct.rx_overflows = buf.get_u16_le();
17306        __struct.tx_buf = buf.get_u8();
17307        __struct.rx_buf = buf.get_u8();
17308        Ok(__struct)
17309    }
17310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17311        let mut __tmp = BytesMut::new(bytes);
17312        #[allow(clippy::absurd_extreme_comparisons)]
17313        #[allow(unused_comparisons)]
17314        if __tmp.remaining() < Self::ENCODED_LEN {
17315            panic!(
17316                "buffer is too small (need {} bytes, but got {})",
17317                Self::ENCODED_LEN,
17318                __tmp.remaining(),
17319            )
17320        }
17321        __tmp.put_u64_le(self.timestamp);
17322        __tmp.put_u32_le(self.tx_rate);
17323        __tmp.put_u32_le(self.rx_rate);
17324        __tmp.put_u32_le(self.messages_sent);
17325        __tmp.put_u32_le(self.messages_received);
17326        __tmp.put_u32_le(self.messages_lost);
17327        __tmp.put_u16_le(self.rx_parse_err);
17328        __tmp.put_u16_le(self.tx_overflows);
17329        __tmp.put_u16_le(self.rx_overflows);
17330        __tmp.put_u8(self.tx_buf);
17331        __tmp.put_u8(self.rx_buf);
17332        if matches!(version, MavlinkVersion::V2) {
17333            let len = __tmp.len();
17334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17335        } else {
17336            __tmp.len()
17337        }
17338    }
17339}
17340#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17341#[doc = ""]
17342#[doc = "ID: 32"]
17343#[derive(Debug, Clone, PartialEq)]
17344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17346#[cfg_attr(feature = "ts", derive(TS))]
17347#[cfg_attr(feature = "ts", ts(export))]
17348pub struct LOCAL_POSITION_NED_DATA {
17349    #[doc = "Timestamp (time since system boot)."]
17350    pub time_boot_ms: u32,
17351    #[doc = "X Position"]
17352    pub x: f32,
17353    #[doc = "Y Position"]
17354    pub y: f32,
17355    #[doc = "Z Position"]
17356    pub z: f32,
17357    #[doc = "X Speed"]
17358    pub vx: f32,
17359    #[doc = "Y Speed"]
17360    pub vy: f32,
17361    #[doc = "Z Speed"]
17362    pub vz: f32,
17363}
17364impl LOCAL_POSITION_NED_DATA {
17365    pub const ENCODED_LEN: usize = 28usize;
17366    pub const DEFAULT: Self = Self {
17367        time_boot_ms: 0_u32,
17368        x: 0.0_f32,
17369        y: 0.0_f32,
17370        z: 0.0_f32,
17371        vx: 0.0_f32,
17372        vy: 0.0_f32,
17373        vz: 0.0_f32,
17374    };
17375    #[cfg(feature = "arbitrary")]
17376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17377        use arbitrary::{Arbitrary, Unstructured};
17378        let mut buf = [0u8; 1024];
17379        rng.fill_bytes(&mut buf);
17380        let mut unstructured = Unstructured::new(&buf);
17381        Self::arbitrary(&mut unstructured).unwrap_or_default()
17382    }
17383}
17384impl Default for LOCAL_POSITION_NED_DATA {
17385    fn default() -> Self {
17386        Self::DEFAULT.clone()
17387    }
17388}
17389impl MessageData for LOCAL_POSITION_NED_DATA {
17390    type Message = MavMessage;
17391    const ID: u32 = 32u32;
17392    const NAME: &'static str = "LOCAL_POSITION_NED";
17393    const EXTRA_CRC: u8 = 185u8;
17394    const ENCODED_LEN: usize = 28usize;
17395    fn deser(
17396        _version: MavlinkVersion,
17397        __input: &[u8],
17398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17399        let avail_len = __input.len();
17400        let mut payload_buf = [0; Self::ENCODED_LEN];
17401        let mut buf = if avail_len < Self::ENCODED_LEN {
17402            payload_buf[0..avail_len].copy_from_slice(__input);
17403            Bytes::new(&payload_buf)
17404        } else {
17405            Bytes::new(__input)
17406        };
17407        let mut __struct = Self::default();
17408        __struct.time_boot_ms = buf.get_u32_le();
17409        __struct.x = buf.get_f32_le();
17410        __struct.y = buf.get_f32_le();
17411        __struct.z = buf.get_f32_le();
17412        __struct.vx = buf.get_f32_le();
17413        __struct.vy = buf.get_f32_le();
17414        __struct.vz = buf.get_f32_le();
17415        Ok(__struct)
17416    }
17417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17418        let mut __tmp = BytesMut::new(bytes);
17419        #[allow(clippy::absurd_extreme_comparisons)]
17420        #[allow(unused_comparisons)]
17421        if __tmp.remaining() < Self::ENCODED_LEN {
17422            panic!(
17423                "buffer is too small (need {} bytes, but got {})",
17424                Self::ENCODED_LEN,
17425                __tmp.remaining(),
17426            )
17427        }
17428        __tmp.put_u32_le(self.time_boot_ms);
17429        __tmp.put_f32_le(self.x);
17430        __tmp.put_f32_le(self.y);
17431        __tmp.put_f32_le(self.z);
17432        __tmp.put_f32_le(self.vx);
17433        __tmp.put_f32_le(self.vy);
17434        __tmp.put_f32_le(self.vz);
17435        if matches!(version, MavlinkVersion::V2) {
17436            let len = __tmp.len();
17437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17438        } else {
17439            __tmp.len()
17440        }
17441    }
17442}
17443#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17444#[doc = ""]
17445#[doc = "ID: 64"]
17446#[derive(Debug, Clone, PartialEq)]
17447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17449#[cfg_attr(feature = "ts", derive(TS))]
17450#[cfg_attr(feature = "ts", ts(export))]
17451pub struct LOCAL_POSITION_NED_COV_DATA {
17452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17453    pub time_usec: u64,
17454    #[doc = "X Position"]
17455    pub x: f32,
17456    #[doc = "Y Position"]
17457    pub y: f32,
17458    #[doc = "Z Position"]
17459    pub z: f32,
17460    #[doc = "X Speed"]
17461    pub vx: f32,
17462    #[doc = "Y Speed"]
17463    pub vy: f32,
17464    #[doc = "Z Speed"]
17465    pub vz: f32,
17466    #[doc = "X Acceleration"]
17467    pub ax: f32,
17468    #[doc = "Y Acceleration"]
17469    pub ay: f32,
17470    #[doc = "Z Acceleration"]
17471    pub az: f32,
17472    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17475    pub covariance: [f32; 45],
17476    #[doc = "Class id of the estimator this estimate originated from."]
17477    pub estimator_type: MavEstimatorType,
17478}
17479impl LOCAL_POSITION_NED_COV_DATA {
17480    pub const ENCODED_LEN: usize = 225usize;
17481    pub const DEFAULT: Self = Self {
17482        time_usec: 0_u64,
17483        x: 0.0_f32,
17484        y: 0.0_f32,
17485        z: 0.0_f32,
17486        vx: 0.0_f32,
17487        vy: 0.0_f32,
17488        vz: 0.0_f32,
17489        ax: 0.0_f32,
17490        ay: 0.0_f32,
17491        az: 0.0_f32,
17492        covariance: [0.0_f32; 45usize],
17493        estimator_type: MavEstimatorType::DEFAULT,
17494    };
17495    #[cfg(feature = "arbitrary")]
17496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17497        use arbitrary::{Arbitrary, Unstructured};
17498        let mut buf = [0u8; 1024];
17499        rng.fill_bytes(&mut buf);
17500        let mut unstructured = Unstructured::new(&buf);
17501        Self::arbitrary(&mut unstructured).unwrap_or_default()
17502    }
17503}
17504impl Default for LOCAL_POSITION_NED_COV_DATA {
17505    fn default() -> Self {
17506        Self::DEFAULT.clone()
17507    }
17508}
17509impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17510    type Message = MavMessage;
17511    const ID: u32 = 64u32;
17512    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17513    const EXTRA_CRC: u8 = 191u8;
17514    const ENCODED_LEN: usize = 225usize;
17515    fn deser(
17516        _version: MavlinkVersion,
17517        __input: &[u8],
17518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17519        let avail_len = __input.len();
17520        let mut payload_buf = [0; Self::ENCODED_LEN];
17521        let mut buf = if avail_len < Self::ENCODED_LEN {
17522            payload_buf[0..avail_len].copy_from_slice(__input);
17523            Bytes::new(&payload_buf)
17524        } else {
17525            Bytes::new(__input)
17526        };
17527        let mut __struct = Self::default();
17528        __struct.time_usec = buf.get_u64_le();
17529        __struct.x = buf.get_f32_le();
17530        __struct.y = buf.get_f32_le();
17531        __struct.z = buf.get_f32_le();
17532        __struct.vx = buf.get_f32_le();
17533        __struct.vy = buf.get_f32_le();
17534        __struct.vz = buf.get_f32_le();
17535        __struct.ax = buf.get_f32_le();
17536        __struct.ay = buf.get_f32_le();
17537        __struct.az = buf.get_f32_le();
17538        for v in &mut __struct.covariance {
17539            let val = buf.get_f32_le();
17540            *v = val;
17541        }
17542        let tmp = buf.get_u8();
17543        __struct.estimator_type =
17544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17545                enum_type: "MavEstimatorType",
17546                value: tmp as u32,
17547            })?;
17548        Ok(__struct)
17549    }
17550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17551        let mut __tmp = BytesMut::new(bytes);
17552        #[allow(clippy::absurd_extreme_comparisons)]
17553        #[allow(unused_comparisons)]
17554        if __tmp.remaining() < Self::ENCODED_LEN {
17555            panic!(
17556                "buffer is too small (need {} bytes, but got {})",
17557                Self::ENCODED_LEN,
17558                __tmp.remaining(),
17559            )
17560        }
17561        __tmp.put_u64_le(self.time_usec);
17562        __tmp.put_f32_le(self.x);
17563        __tmp.put_f32_le(self.y);
17564        __tmp.put_f32_le(self.z);
17565        __tmp.put_f32_le(self.vx);
17566        __tmp.put_f32_le(self.vy);
17567        __tmp.put_f32_le(self.vz);
17568        __tmp.put_f32_le(self.ax);
17569        __tmp.put_f32_le(self.ay);
17570        __tmp.put_f32_le(self.az);
17571        for val in &self.covariance {
17572            __tmp.put_f32_le(*val);
17573        }
17574        __tmp.put_u8(self.estimator_type as u8);
17575        if matches!(version, MavlinkVersion::V2) {
17576            let len = __tmp.len();
17577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17578        } else {
17579            __tmp.len()
17580        }
17581    }
17582}
17583#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17584#[doc = ""]
17585#[doc = "ID: 89"]
17586#[derive(Debug, Clone, PartialEq)]
17587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17589#[cfg_attr(feature = "ts", derive(TS))]
17590#[cfg_attr(feature = "ts", ts(export))]
17591pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17592    #[doc = "Timestamp (time since system boot)."]
17593    pub time_boot_ms: u32,
17594    #[doc = "X Position"]
17595    pub x: f32,
17596    #[doc = "Y Position"]
17597    pub y: f32,
17598    #[doc = "Z Position"]
17599    pub z: f32,
17600    #[doc = "Roll"]
17601    pub roll: f32,
17602    #[doc = "Pitch"]
17603    pub pitch: f32,
17604    #[doc = "Yaw"]
17605    pub yaw: f32,
17606}
17607impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17608    pub const ENCODED_LEN: usize = 28usize;
17609    pub const DEFAULT: Self = Self {
17610        time_boot_ms: 0_u32,
17611        x: 0.0_f32,
17612        y: 0.0_f32,
17613        z: 0.0_f32,
17614        roll: 0.0_f32,
17615        pitch: 0.0_f32,
17616        yaw: 0.0_f32,
17617    };
17618    #[cfg(feature = "arbitrary")]
17619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17620        use arbitrary::{Arbitrary, Unstructured};
17621        let mut buf = [0u8; 1024];
17622        rng.fill_bytes(&mut buf);
17623        let mut unstructured = Unstructured::new(&buf);
17624        Self::arbitrary(&mut unstructured).unwrap_or_default()
17625    }
17626}
17627impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17628    fn default() -> Self {
17629        Self::DEFAULT.clone()
17630    }
17631}
17632impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17633    type Message = MavMessage;
17634    const ID: u32 = 89u32;
17635    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17636    const EXTRA_CRC: u8 = 231u8;
17637    const ENCODED_LEN: usize = 28usize;
17638    fn deser(
17639        _version: MavlinkVersion,
17640        __input: &[u8],
17641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17642        let avail_len = __input.len();
17643        let mut payload_buf = [0; Self::ENCODED_LEN];
17644        let mut buf = if avail_len < Self::ENCODED_LEN {
17645            payload_buf[0..avail_len].copy_from_slice(__input);
17646            Bytes::new(&payload_buf)
17647        } else {
17648            Bytes::new(__input)
17649        };
17650        let mut __struct = Self::default();
17651        __struct.time_boot_ms = buf.get_u32_le();
17652        __struct.x = buf.get_f32_le();
17653        __struct.y = buf.get_f32_le();
17654        __struct.z = buf.get_f32_le();
17655        __struct.roll = buf.get_f32_le();
17656        __struct.pitch = buf.get_f32_le();
17657        __struct.yaw = buf.get_f32_le();
17658        Ok(__struct)
17659    }
17660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17661        let mut __tmp = BytesMut::new(bytes);
17662        #[allow(clippy::absurd_extreme_comparisons)]
17663        #[allow(unused_comparisons)]
17664        if __tmp.remaining() < Self::ENCODED_LEN {
17665            panic!(
17666                "buffer is too small (need {} bytes, but got {})",
17667                Self::ENCODED_LEN,
17668                __tmp.remaining(),
17669            )
17670        }
17671        __tmp.put_u32_le(self.time_boot_ms);
17672        __tmp.put_f32_le(self.x);
17673        __tmp.put_f32_le(self.y);
17674        __tmp.put_f32_le(self.z);
17675        __tmp.put_f32_le(self.roll);
17676        __tmp.put_f32_le(self.pitch);
17677        __tmp.put_f32_le(self.yaw);
17678        if matches!(version, MavlinkVersion::V2) {
17679            let len = __tmp.len();
17680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17681        } else {
17682            __tmp.len()
17683        }
17684    }
17685}
17686#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17687#[doc = ""]
17688#[doc = "ID: 268"]
17689#[derive(Debug, Clone, PartialEq)]
17690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17692#[cfg_attr(feature = "ts", derive(TS))]
17693#[cfg_attr(feature = "ts", ts(export))]
17694pub struct LOGGING_ACK_DATA {
17695    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17696    pub sequence: u16,
17697    #[doc = "system ID of the target"]
17698    pub target_system: u8,
17699    #[doc = "component ID of the target"]
17700    pub target_component: u8,
17701}
17702impl LOGGING_ACK_DATA {
17703    pub const ENCODED_LEN: usize = 4usize;
17704    pub const DEFAULT: Self = Self {
17705        sequence: 0_u16,
17706        target_system: 0_u8,
17707        target_component: 0_u8,
17708    };
17709    #[cfg(feature = "arbitrary")]
17710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17711        use arbitrary::{Arbitrary, Unstructured};
17712        let mut buf = [0u8; 1024];
17713        rng.fill_bytes(&mut buf);
17714        let mut unstructured = Unstructured::new(&buf);
17715        Self::arbitrary(&mut unstructured).unwrap_or_default()
17716    }
17717}
17718impl Default for LOGGING_ACK_DATA {
17719    fn default() -> Self {
17720        Self::DEFAULT.clone()
17721    }
17722}
17723impl MessageData for LOGGING_ACK_DATA {
17724    type Message = MavMessage;
17725    const ID: u32 = 268u32;
17726    const NAME: &'static str = "LOGGING_ACK";
17727    const EXTRA_CRC: u8 = 14u8;
17728    const ENCODED_LEN: usize = 4usize;
17729    fn deser(
17730        _version: MavlinkVersion,
17731        __input: &[u8],
17732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17733        let avail_len = __input.len();
17734        let mut payload_buf = [0; Self::ENCODED_LEN];
17735        let mut buf = if avail_len < Self::ENCODED_LEN {
17736            payload_buf[0..avail_len].copy_from_slice(__input);
17737            Bytes::new(&payload_buf)
17738        } else {
17739            Bytes::new(__input)
17740        };
17741        let mut __struct = Self::default();
17742        __struct.sequence = buf.get_u16_le();
17743        __struct.target_system = buf.get_u8();
17744        __struct.target_component = buf.get_u8();
17745        Ok(__struct)
17746    }
17747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17748        let mut __tmp = BytesMut::new(bytes);
17749        #[allow(clippy::absurd_extreme_comparisons)]
17750        #[allow(unused_comparisons)]
17751        if __tmp.remaining() < Self::ENCODED_LEN {
17752            panic!(
17753                "buffer is too small (need {} bytes, but got {})",
17754                Self::ENCODED_LEN,
17755                __tmp.remaining(),
17756            )
17757        }
17758        __tmp.put_u16_le(self.sequence);
17759        __tmp.put_u8(self.target_system);
17760        __tmp.put_u8(self.target_component);
17761        if matches!(version, MavlinkVersion::V2) {
17762            let len = __tmp.len();
17763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17764        } else {
17765            __tmp.len()
17766        }
17767    }
17768}
17769#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17770#[doc = ""]
17771#[doc = "ID: 266"]
17772#[derive(Debug, Clone, PartialEq)]
17773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17775#[cfg_attr(feature = "ts", derive(TS))]
17776#[cfg_attr(feature = "ts", ts(export))]
17777pub struct LOGGING_DATA_DATA {
17778    #[doc = "sequence number (can wrap)"]
17779    pub sequence: u16,
17780    #[doc = "system ID of the target"]
17781    pub target_system: u8,
17782    #[doc = "component ID of the target"]
17783    pub target_component: u8,
17784    #[doc = "data length"]
17785    pub length: u8,
17786    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17787    pub first_message_offset: u8,
17788    #[doc = "logged data"]
17789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17791    pub data: [u8; 249],
17792}
17793impl LOGGING_DATA_DATA {
17794    pub const ENCODED_LEN: usize = 255usize;
17795    pub const DEFAULT: Self = Self {
17796        sequence: 0_u16,
17797        target_system: 0_u8,
17798        target_component: 0_u8,
17799        length: 0_u8,
17800        first_message_offset: 0_u8,
17801        data: [0_u8; 249usize],
17802    };
17803    #[cfg(feature = "arbitrary")]
17804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17805        use arbitrary::{Arbitrary, Unstructured};
17806        let mut buf = [0u8; 1024];
17807        rng.fill_bytes(&mut buf);
17808        let mut unstructured = Unstructured::new(&buf);
17809        Self::arbitrary(&mut unstructured).unwrap_or_default()
17810    }
17811}
17812impl Default for LOGGING_DATA_DATA {
17813    fn default() -> Self {
17814        Self::DEFAULT.clone()
17815    }
17816}
17817impl MessageData for LOGGING_DATA_DATA {
17818    type Message = MavMessage;
17819    const ID: u32 = 266u32;
17820    const NAME: &'static str = "LOGGING_DATA";
17821    const EXTRA_CRC: u8 = 193u8;
17822    const ENCODED_LEN: usize = 255usize;
17823    fn deser(
17824        _version: MavlinkVersion,
17825        __input: &[u8],
17826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17827        let avail_len = __input.len();
17828        let mut payload_buf = [0; Self::ENCODED_LEN];
17829        let mut buf = if avail_len < Self::ENCODED_LEN {
17830            payload_buf[0..avail_len].copy_from_slice(__input);
17831            Bytes::new(&payload_buf)
17832        } else {
17833            Bytes::new(__input)
17834        };
17835        let mut __struct = Self::default();
17836        __struct.sequence = buf.get_u16_le();
17837        __struct.target_system = buf.get_u8();
17838        __struct.target_component = buf.get_u8();
17839        __struct.length = buf.get_u8();
17840        __struct.first_message_offset = buf.get_u8();
17841        for v in &mut __struct.data {
17842            let val = buf.get_u8();
17843            *v = val;
17844        }
17845        Ok(__struct)
17846    }
17847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17848        let mut __tmp = BytesMut::new(bytes);
17849        #[allow(clippy::absurd_extreme_comparisons)]
17850        #[allow(unused_comparisons)]
17851        if __tmp.remaining() < Self::ENCODED_LEN {
17852            panic!(
17853                "buffer is too small (need {} bytes, but got {})",
17854                Self::ENCODED_LEN,
17855                __tmp.remaining(),
17856            )
17857        }
17858        __tmp.put_u16_le(self.sequence);
17859        __tmp.put_u8(self.target_system);
17860        __tmp.put_u8(self.target_component);
17861        __tmp.put_u8(self.length);
17862        __tmp.put_u8(self.first_message_offset);
17863        for val in &self.data {
17864            __tmp.put_u8(*val);
17865        }
17866        if matches!(version, MavlinkVersion::V2) {
17867            let len = __tmp.len();
17868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17869        } else {
17870            __tmp.len()
17871        }
17872    }
17873}
17874#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17875#[doc = ""]
17876#[doc = "ID: 267"]
17877#[derive(Debug, Clone, PartialEq)]
17878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17880#[cfg_attr(feature = "ts", derive(TS))]
17881#[cfg_attr(feature = "ts", ts(export))]
17882pub struct LOGGING_DATA_ACKED_DATA {
17883    #[doc = "sequence number (can wrap)"]
17884    pub sequence: u16,
17885    #[doc = "system ID of the target"]
17886    pub target_system: u8,
17887    #[doc = "component ID of the target"]
17888    pub target_component: u8,
17889    #[doc = "data length"]
17890    pub length: u8,
17891    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17892    pub first_message_offset: u8,
17893    #[doc = "logged data"]
17894    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17895    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17896    pub data: [u8; 249],
17897}
17898impl LOGGING_DATA_ACKED_DATA {
17899    pub const ENCODED_LEN: usize = 255usize;
17900    pub const DEFAULT: Self = Self {
17901        sequence: 0_u16,
17902        target_system: 0_u8,
17903        target_component: 0_u8,
17904        length: 0_u8,
17905        first_message_offset: 0_u8,
17906        data: [0_u8; 249usize],
17907    };
17908    #[cfg(feature = "arbitrary")]
17909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17910        use arbitrary::{Arbitrary, Unstructured};
17911        let mut buf = [0u8; 1024];
17912        rng.fill_bytes(&mut buf);
17913        let mut unstructured = Unstructured::new(&buf);
17914        Self::arbitrary(&mut unstructured).unwrap_or_default()
17915    }
17916}
17917impl Default for LOGGING_DATA_ACKED_DATA {
17918    fn default() -> Self {
17919        Self::DEFAULT.clone()
17920    }
17921}
17922impl MessageData for LOGGING_DATA_ACKED_DATA {
17923    type Message = MavMessage;
17924    const ID: u32 = 267u32;
17925    const NAME: &'static str = "LOGGING_DATA_ACKED";
17926    const EXTRA_CRC: u8 = 35u8;
17927    const ENCODED_LEN: usize = 255usize;
17928    fn deser(
17929        _version: MavlinkVersion,
17930        __input: &[u8],
17931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17932        let avail_len = __input.len();
17933        let mut payload_buf = [0; Self::ENCODED_LEN];
17934        let mut buf = if avail_len < Self::ENCODED_LEN {
17935            payload_buf[0..avail_len].copy_from_slice(__input);
17936            Bytes::new(&payload_buf)
17937        } else {
17938            Bytes::new(__input)
17939        };
17940        let mut __struct = Self::default();
17941        __struct.sequence = buf.get_u16_le();
17942        __struct.target_system = buf.get_u8();
17943        __struct.target_component = buf.get_u8();
17944        __struct.length = buf.get_u8();
17945        __struct.first_message_offset = buf.get_u8();
17946        for v in &mut __struct.data {
17947            let val = buf.get_u8();
17948            *v = val;
17949        }
17950        Ok(__struct)
17951    }
17952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17953        let mut __tmp = BytesMut::new(bytes);
17954        #[allow(clippy::absurd_extreme_comparisons)]
17955        #[allow(unused_comparisons)]
17956        if __tmp.remaining() < Self::ENCODED_LEN {
17957            panic!(
17958                "buffer is too small (need {} bytes, but got {})",
17959                Self::ENCODED_LEN,
17960                __tmp.remaining(),
17961            )
17962        }
17963        __tmp.put_u16_le(self.sequence);
17964        __tmp.put_u8(self.target_system);
17965        __tmp.put_u8(self.target_component);
17966        __tmp.put_u8(self.length);
17967        __tmp.put_u8(self.first_message_offset);
17968        for val in &self.data {
17969            __tmp.put_u8(*val);
17970        }
17971        if matches!(version, MavlinkVersion::V2) {
17972            let len = __tmp.len();
17973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17974        } else {
17975            __tmp.len()
17976        }
17977    }
17978}
17979#[doc = "Reply to LOG_REQUEST_DATA."]
17980#[doc = ""]
17981#[doc = "ID: 120"]
17982#[derive(Debug, Clone, PartialEq)]
17983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17985#[cfg_attr(feature = "ts", derive(TS))]
17986#[cfg_attr(feature = "ts", ts(export))]
17987pub struct LOG_DATA_DATA {
17988    #[doc = "Offset into the log"]
17989    pub ofs: u32,
17990    #[doc = "Log id (from LOG_ENTRY reply)"]
17991    pub id: u16,
17992    #[doc = "Number of bytes (zero for end of log)"]
17993    pub count: u8,
17994    #[doc = "log data"]
17995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17997    pub data: [u8; 90],
17998}
17999impl LOG_DATA_DATA {
18000    pub const ENCODED_LEN: usize = 97usize;
18001    pub const DEFAULT: Self = Self {
18002        ofs: 0_u32,
18003        id: 0_u16,
18004        count: 0_u8,
18005        data: [0_u8; 90usize],
18006    };
18007    #[cfg(feature = "arbitrary")]
18008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18009        use arbitrary::{Arbitrary, Unstructured};
18010        let mut buf = [0u8; 1024];
18011        rng.fill_bytes(&mut buf);
18012        let mut unstructured = Unstructured::new(&buf);
18013        Self::arbitrary(&mut unstructured).unwrap_or_default()
18014    }
18015}
18016impl Default for LOG_DATA_DATA {
18017    fn default() -> Self {
18018        Self::DEFAULT.clone()
18019    }
18020}
18021impl MessageData for LOG_DATA_DATA {
18022    type Message = MavMessage;
18023    const ID: u32 = 120u32;
18024    const NAME: &'static str = "LOG_DATA";
18025    const EXTRA_CRC: u8 = 134u8;
18026    const ENCODED_LEN: usize = 97usize;
18027    fn deser(
18028        _version: MavlinkVersion,
18029        __input: &[u8],
18030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18031        let avail_len = __input.len();
18032        let mut payload_buf = [0; Self::ENCODED_LEN];
18033        let mut buf = if avail_len < Self::ENCODED_LEN {
18034            payload_buf[0..avail_len].copy_from_slice(__input);
18035            Bytes::new(&payload_buf)
18036        } else {
18037            Bytes::new(__input)
18038        };
18039        let mut __struct = Self::default();
18040        __struct.ofs = buf.get_u32_le();
18041        __struct.id = buf.get_u16_le();
18042        __struct.count = buf.get_u8();
18043        for v in &mut __struct.data {
18044            let val = buf.get_u8();
18045            *v = val;
18046        }
18047        Ok(__struct)
18048    }
18049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18050        let mut __tmp = BytesMut::new(bytes);
18051        #[allow(clippy::absurd_extreme_comparisons)]
18052        #[allow(unused_comparisons)]
18053        if __tmp.remaining() < Self::ENCODED_LEN {
18054            panic!(
18055                "buffer is too small (need {} bytes, but got {})",
18056                Self::ENCODED_LEN,
18057                __tmp.remaining(),
18058            )
18059        }
18060        __tmp.put_u32_le(self.ofs);
18061        __tmp.put_u16_le(self.id);
18062        __tmp.put_u8(self.count);
18063        for val in &self.data {
18064            __tmp.put_u8(*val);
18065        }
18066        if matches!(version, MavlinkVersion::V2) {
18067            let len = __tmp.len();
18068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18069        } else {
18070            __tmp.len()
18071        }
18072    }
18073}
18074#[doc = "Reply to LOG_REQUEST_LIST."]
18075#[doc = ""]
18076#[doc = "ID: 118"]
18077#[derive(Debug, Clone, PartialEq)]
18078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18080#[cfg_attr(feature = "ts", derive(TS))]
18081#[cfg_attr(feature = "ts", ts(export))]
18082pub struct LOG_ENTRY_DATA {
18083    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18084    pub time_utc: u32,
18085    #[doc = "Size of the log (may be approximate)"]
18086    pub size: u32,
18087    #[doc = "Log id"]
18088    pub id: u16,
18089    #[doc = "Total number of logs"]
18090    pub num_logs: u16,
18091    #[doc = "High log number"]
18092    pub last_log_num: u16,
18093}
18094impl LOG_ENTRY_DATA {
18095    pub const ENCODED_LEN: usize = 14usize;
18096    pub const DEFAULT: Self = Self {
18097        time_utc: 0_u32,
18098        size: 0_u32,
18099        id: 0_u16,
18100        num_logs: 0_u16,
18101        last_log_num: 0_u16,
18102    };
18103    #[cfg(feature = "arbitrary")]
18104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18105        use arbitrary::{Arbitrary, Unstructured};
18106        let mut buf = [0u8; 1024];
18107        rng.fill_bytes(&mut buf);
18108        let mut unstructured = Unstructured::new(&buf);
18109        Self::arbitrary(&mut unstructured).unwrap_or_default()
18110    }
18111}
18112impl Default for LOG_ENTRY_DATA {
18113    fn default() -> Self {
18114        Self::DEFAULT.clone()
18115    }
18116}
18117impl MessageData for LOG_ENTRY_DATA {
18118    type Message = MavMessage;
18119    const ID: u32 = 118u32;
18120    const NAME: &'static str = "LOG_ENTRY";
18121    const EXTRA_CRC: u8 = 56u8;
18122    const ENCODED_LEN: usize = 14usize;
18123    fn deser(
18124        _version: MavlinkVersion,
18125        __input: &[u8],
18126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18127        let avail_len = __input.len();
18128        let mut payload_buf = [0; Self::ENCODED_LEN];
18129        let mut buf = if avail_len < Self::ENCODED_LEN {
18130            payload_buf[0..avail_len].copy_from_slice(__input);
18131            Bytes::new(&payload_buf)
18132        } else {
18133            Bytes::new(__input)
18134        };
18135        let mut __struct = Self::default();
18136        __struct.time_utc = buf.get_u32_le();
18137        __struct.size = buf.get_u32_le();
18138        __struct.id = buf.get_u16_le();
18139        __struct.num_logs = buf.get_u16_le();
18140        __struct.last_log_num = buf.get_u16_le();
18141        Ok(__struct)
18142    }
18143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18144        let mut __tmp = BytesMut::new(bytes);
18145        #[allow(clippy::absurd_extreme_comparisons)]
18146        #[allow(unused_comparisons)]
18147        if __tmp.remaining() < Self::ENCODED_LEN {
18148            panic!(
18149                "buffer is too small (need {} bytes, but got {})",
18150                Self::ENCODED_LEN,
18151                __tmp.remaining(),
18152            )
18153        }
18154        __tmp.put_u32_le(self.time_utc);
18155        __tmp.put_u32_le(self.size);
18156        __tmp.put_u16_le(self.id);
18157        __tmp.put_u16_le(self.num_logs);
18158        __tmp.put_u16_le(self.last_log_num);
18159        if matches!(version, MavlinkVersion::V2) {
18160            let len = __tmp.len();
18161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18162        } else {
18163            __tmp.len()
18164        }
18165    }
18166}
18167#[doc = "Erase all logs."]
18168#[doc = ""]
18169#[doc = "ID: 121"]
18170#[derive(Debug, Clone, PartialEq)]
18171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18173#[cfg_attr(feature = "ts", derive(TS))]
18174#[cfg_attr(feature = "ts", ts(export))]
18175pub struct LOG_ERASE_DATA {
18176    #[doc = "System ID"]
18177    pub target_system: u8,
18178    #[doc = "Component ID"]
18179    pub target_component: u8,
18180}
18181impl LOG_ERASE_DATA {
18182    pub const ENCODED_LEN: usize = 2usize;
18183    pub const DEFAULT: Self = Self {
18184        target_system: 0_u8,
18185        target_component: 0_u8,
18186    };
18187    #[cfg(feature = "arbitrary")]
18188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18189        use arbitrary::{Arbitrary, Unstructured};
18190        let mut buf = [0u8; 1024];
18191        rng.fill_bytes(&mut buf);
18192        let mut unstructured = Unstructured::new(&buf);
18193        Self::arbitrary(&mut unstructured).unwrap_or_default()
18194    }
18195}
18196impl Default for LOG_ERASE_DATA {
18197    fn default() -> Self {
18198        Self::DEFAULT.clone()
18199    }
18200}
18201impl MessageData for LOG_ERASE_DATA {
18202    type Message = MavMessage;
18203    const ID: u32 = 121u32;
18204    const NAME: &'static str = "LOG_ERASE";
18205    const EXTRA_CRC: u8 = 237u8;
18206    const ENCODED_LEN: usize = 2usize;
18207    fn deser(
18208        _version: MavlinkVersion,
18209        __input: &[u8],
18210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18211        let avail_len = __input.len();
18212        let mut payload_buf = [0; Self::ENCODED_LEN];
18213        let mut buf = if avail_len < Self::ENCODED_LEN {
18214            payload_buf[0..avail_len].copy_from_slice(__input);
18215            Bytes::new(&payload_buf)
18216        } else {
18217            Bytes::new(__input)
18218        };
18219        let mut __struct = Self::default();
18220        __struct.target_system = buf.get_u8();
18221        __struct.target_component = buf.get_u8();
18222        Ok(__struct)
18223    }
18224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18225        let mut __tmp = BytesMut::new(bytes);
18226        #[allow(clippy::absurd_extreme_comparisons)]
18227        #[allow(unused_comparisons)]
18228        if __tmp.remaining() < Self::ENCODED_LEN {
18229            panic!(
18230                "buffer is too small (need {} bytes, but got {})",
18231                Self::ENCODED_LEN,
18232                __tmp.remaining(),
18233            )
18234        }
18235        __tmp.put_u8(self.target_system);
18236        __tmp.put_u8(self.target_component);
18237        if matches!(version, MavlinkVersion::V2) {
18238            let len = __tmp.len();
18239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18240        } else {
18241            __tmp.len()
18242        }
18243    }
18244}
18245#[doc = "Request a chunk of a log."]
18246#[doc = ""]
18247#[doc = "ID: 119"]
18248#[derive(Debug, Clone, PartialEq)]
18249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18251#[cfg_attr(feature = "ts", derive(TS))]
18252#[cfg_attr(feature = "ts", ts(export))]
18253pub struct LOG_REQUEST_DATA_DATA {
18254    #[doc = "Offset into the log"]
18255    pub ofs: u32,
18256    #[doc = "Number of bytes"]
18257    pub count: u32,
18258    #[doc = "Log id (from LOG_ENTRY reply)"]
18259    pub id: u16,
18260    #[doc = "System ID"]
18261    pub target_system: u8,
18262    #[doc = "Component ID"]
18263    pub target_component: u8,
18264}
18265impl LOG_REQUEST_DATA_DATA {
18266    pub const ENCODED_LEN: usize = 12usize;
18267    pub const DEFAULT: Self = Self {
18268        ofs: 0_u32,
18269        count: 0_u32,
18270        id: 0_u16,
18271        target_system: 0_u8,
18272        target_component: 0_u8,
18273    };
18274    #[cfg(feature = "arbitrary")]
18275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18276        use arbitrary::{Arbitrary, Unstructured};
18277        let mut buf = [0u8; 1024];
18278        rng.fill_bytes(&mut buf);
18279        let mut unstructured = Unstructured::new(&buf);
18280        Self::arbitrary(&mut unstructured).unwrap_or_default()
18281    }
18282}
18283impl Default for LOG_REQUEST_DATA_DATA {
18284    fn default() -> Self {
18285        Self::DEFAULT.clone()
18286    }
18287}
18288impl MessageData for LOG_REQUEST_DATA_DATA {
18289    type Message = MavMessage;
18290    const ID: u32 = 119u32;
18291    const NAME: &'static str = "LOG_REQUEST_DATA";
18292    const EXTRA_CRC: u8 = 116u8;
18293    const ENCODED_LEN: usize = 12usize;
18294    fn deser(
18295        _version: MavlinkVersion,
18296        __input: &[u8],
18297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18298        let avail_len = __input.len();
18299        let mut payload_buf = [0; Self::ENCODED_LEN];
18300        let mut buf = if avail_len < Self::ENCODED_LEN {
18301            payload_buf[0..avail_len].copy_from_slice(__input);
18302            Bytes::new(&payload_buf)
18303        } else {
18304            Bytes::new(__input)
18305        };
18306        let mut __struct = Self::default();
18307        __struct.ofs = buf.get_u32_le();
18308        __struct.count = buf.get_u32_le();
18309        __struct.id = buf.get_u16_le();
18310        __struct.target_system = buf.get_u8();
18311        __struct.target_component = buf.get_u8();
18312        Ok(__struct)
18313    }
18314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18315        let mut __tmp = BytesMut::new(bytes);
18316        #[allow(clippy::absurd_extreme_comparisons)]
18317        #[allow(unused_comparisons)]
18318        if __tmp.remaining() < Self::ENCODED_LEN {
18319            panic!(
18320                "buffer is too small (need {} bytes, but got {})",
18321                Self::ENCODED_LEN,
18322                __tmp.remaining(),
18323            )
18324        }
18325        __tmp.put_u32_le(self.ofs);
18326        __tmp.put_u32_le(self.count);
18327        __tmp.put_u16_le(self.id);
18328        __tmp.put_u8(self.target_system);
18329        __tmp.put_u8(self.target_component);
18330        if matches!(version, MavlinkVersion::V2) {
18331            let len = __tmp.len();
18332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18333        } else {
18334            __tmp.len()
18335        }
18336    }
18337}
18338#[doc = "Stop log transfer and resume normal logging."]
18339#[doc = ""]
18340#[doc = "ID: 122"]
18341#[derive(Debug, Clone, PartialEq)]
18342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18344#[cfg_attr(feature = "ts", derive(TS))]
18345#[cfg_attr(feature = "ts", ts(export))]
18346pub struct LOG_REQUEST_END_DATA {
18347    #[doc = "System ID"]
18348    pub target_system: u8,
18349    #[doc = "Component ID"]
18350    pub target_component: u8,
18351}
18352impl LOG_REQUEST_END_DATA {
18353    pub const ENCODED_LEN: usize = 2usize;
18354    pub const DEFAULT: Self = Self {
18355        target_system: 0_u8,
18356        target_component: 0_u8,
18357    };
18358    #[cfg(feature = "arbitrary")]
18359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18360        use arbitrary::{Arbitrary, Unstructured};
18361        let mut buf = [0u8; 1024];
18362        rng.fill_bytes(&mut buf);
18363        let mut unstructured = Unstructured::new(&buf);
18364        Self::arbitrary(&mut unstructured).unwrap_or_default()
18365    }
18366}
18367impl Default for LOG_REQUEST_END_DATA {
18368    fn default() -> Self {
18369        Self::DEFAULT.clone()
18370    }
18371}
18372impl MessageData for LOG_REQUEST_END_DATA {
18373    type Message = MavMessage;
18374    const ID: u32 = 122u32;
18375    const NAME: &'static str = "LOG_REQUEST_END";
18376    const EXTRA_CRC: u8 = 203u8;
18377    const ENCODED_LEN: usize = 2usize;
18378    fn deser(
18379        _version: MavlinkVersion,
18380        __input: &[u8],
18381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18382        let avail_len = __input.len();
18383        let mut payload_buf = [0; Self::ENCODED_LEN];
18384        let mut buf = if avail_len < Self::ENCODED_LEN {
18385            payload_buf[0..avail_len].copy_from_slice(__input);
18386            Bytes::new(&payload_buf)
18387        } else {
18388            Bytes::new(__input)
18389        };
18390        let mut __struct = Self::default();
18391        __struct.target_system = buf.get_u8();
18392        __struct.target_component = buf.get_u8();
18393        Ok(__struct)
18394    }
18395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18396        let mut __tmp = BytesMut::new(bytes);
18397        #[allow(clippy::absurd_extreme_comparisons)]
18398        #[allow(unused_comparisons)]
18399        if __tmp.remaining() < Self::ENCODED_LEN {
18400            panic!(
18401                "buffer is too small (need {} bytes, but got {})",
18402                Self::ENCODED_LEN,
18403                __tmp.remaining(),
18404            )
18405        }
18406        __tmp.put_u8(self.target_system);
18407        __tmp.put_u8(self.target_component);
18408        if matches!(version, MavlinkVersion::V2) {
18409            let len = __tmp.len();
18410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18411        } else {
18412            __tmp.len()
18413        }
18414    }
18415}
18416#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18417#[doc = ""]
18418#[doc = "ID: 117"]
18419#[derive(Debug, Clone, PartialEq)]
18420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18422#[cfg_attr(feature = "ts", derive(TS))]
18423#[cfg_attr(feature = "ts", ts(export))]
18424pub struct LOG_REQUEST_LIST_DATA {
18425    #[doc = "First log id (0 for first available)"]
18426    pub start: u16,
18427    #[doc = "Last log id (0xffff for last available)"]
18428    pub end: u16,
18429    #[doc = "System ID"]
18430    pub target_system: u8,
18431    #[doc = "Component ID"]
18432    pub target_component: u8,
18433}
18434impl LOG_REQUEST_LIST_DATA {
18435    pub const ENCODED_LEN: usize = 6usize;
18436    pub const DEFAULT: Self = Self {
18437        start: 0_u16,
18438        end: 0_u16,
18439        target_system: 0_u8,
18440        target_component: 0_u8,
18441    };
18442    #[cfg(feature = "arbitrary")]
18443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18444        use arbitrary::{Arbitrary, Unstructured};
18445        let mut buf = [0u8; 1024];
18446        rng.fill_bytes(&mut buf);
18447        let mut unstructured = Unstructured::new(&buf);
18448        Self::arbitrary(&mut unstructured).unwrap_or_default()
18449    }
18450}
18451impl Default for LOG_REQUEST_LIST_DATA {
18452    fn default() -> Self {
18453        Self::DEFAULT.clone()
18454    }
18455}
18456impl MessageData for LOG_REQUEST_LIST_DATA {
18457    type Message = MavMessage;
18458    const ID: u32 = 117u32;
18459    const NAME: &'static str = "LOG_REQUEST_LIST";
18460    const EXTRA_CRC: u8 = 128u8;
18461    const ENCODED_LEN: usize = 6usize;
18462    fn deser(
18463        _version: MavlinkVersion,
18464        __input: &[u8],
18465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18466        let avail_len = __input.len();
18467        let mut payload_buf = [0; Self::ENCODED_LEN];
18468        let mut buf = if avail_len < Self::ENCODED_LEN {
18469            payload_buf[0..avail_len].copy_from_slice(__input);
18470            Bytes::new(&payload_buf)
18471        } else {
18472            Bytes::new(__input)
18473        };
18474        let mut __struct = Self::default();
18475        __struct.start = buf.get_u16_le();
18476        __struct.end = buf.get_u16_le();
18477        __struct.target_system = buf.get_u8();
18478        __struct.target_component = buf.get_u8();
18479        Ok(__struct)
18480    }
18481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18482        let mut __tmp = BytesMut::new(bytes);
18483        #[allow(clippy::absurd_extreme_comparisons)]
18484        #[allow(unused_comparisons)]
18485        if __tmp.remaining() < Self::ENCODED_LEN {
18486            panic!(
18487                "buffer is too small (need {} bytes, but got {})",
18488                Self::ENCODED_LEN,
18489                __tmp.remaining(),
18490            )
18491        }
18492        __tmp.put_u16_le(self.start);
18493        __tmp.put_u16_le(self.end);
18494        __tmp.put_u8(self.target_system);
18495        __tmp.put_u8(self.target_component);
18496        if matches!(version, MavlinkVersion::V2) {
18497            let len = __tmp.len();
18498            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18499        } else {
18500            __tmp.len()
18501        }
18502    }
18503}
18504#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18505#[doc = ""]
18506#[doc = "ID: 192"]
18507#[derive(Debug, Clone, PartialEq)]
18508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18510#[cfg_attr(feature = "ts", derive(TS))]
18511#[cfg_attr(feature = "ts", ts(export))]
18512pub struct MAG_CAL_REPORT_DATA {
18513    #[doc = "RMS milligauss residuals."]
18514    pub fitness: f32,
18515    #[doc = "X offset."]
18516    pub ofs_x: f32,
18517    #[doc = "Y offset."]
18518    pub ofs_y: f32,
18519    #[doc = "Z offset."]
18520    pub ofs_z: f32,
18521    #[doc = "X diagonal (matrix 11)."]
18522    pub diag_x: f32,
18523    #[doc = "Y diagonal (matrix 22)."]
18524    pub diag_y: f32,
18525    #[doc = "Z diagonal (matrix 33)."]
18526    pub diag_z: f32,
18527    #[doc = "X off-diagonal (matrix 12 and 21)."]
18528    pub offdiag_x: f32,
18529    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18530    pub offdiag_y: f32,
18531    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18532    pub offdiag_z: f32,
18533    #[doc = "Compass being calibrated."]
18534    pub compass_id: u8,
18535    #[doc = "Bitmask of compasses being calibrated."]
18536    pub cal_mask: u8,
18537    #[doc = "Calibration Status."]
18538    pub cal_status: MagCalStatus,
18539    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18540    pub autosaved: u8,
18541    #[doc = "Confidence in orientation (higher is better)."]
18542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18543    pub orientation_confidence: f32,
18544    #[doc = "orientation before calibration."]
18545    #[cfg_attr(feature = "serde", serde(default))]
18546    pub old_orientation: MavSensorOrientation,
18547    #[doc = "orientation after calibration."]
18548    #[cfg_attr(feature = "serde", serde(default))]
18549    pub new_orientation: MavSensorOrientation,
18550    #[doc = "field radius correction factor"]
18551    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18552    pub scale_factor: f32,
18553}
18554impl MAG_CAL_REPORT_DATA {
18555    pub const ENCODED_LEN: usize = 54usize;
18556    pub const DEFAULT: Self = Self {
18557        fitness: 0.0_f32,
18558        ofs_x: 0.0_f32,
18559        ofs_y: 0.0_f32,
18560        ofs_z: 0.0_f32,
18561        diag_x: 0.0_f32,
18562        diag_y: 0.0_f32,
18563        diag_z: 0.0_f32,
18564        offdiag_x: 0.0_f32,
18565        offdiag_y: 0.0_f32,
18566        offdiag_z: 0.0_f32,
18567        compass_id: 0_u8,
18568        cal_mask: 0_u8,
18569        cal_status: MagCalStatus::DEFAULT,
18570        autosaved: 0_u8,
18571        orientation_confidence: 0.0_f32,
18572        old_orientation: MavSensorOrientation::DEFAULT,
18573        new_orientation: MavSensorOrientation::DEFAULT,
18574        scale_factor: 0.0_f32,
18575    };
18576    #[cfg(feature = "arbitrary")]
18577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18578        use arbitrary::{Arbitrary, Unstructured};
18579        let mut buf = [0u8; 1024];
18580        rng.fill_bytes(&mut buf);
18581        let mut unstructured = Unstructured::new(&buf);
18582        Self::arbitrary(&mut unstructured).unwrap_or_default()
18583    }
18584}
18585impl Default for MAG_CAL_REPORT_DATA {
18586    fn default() -> Self {
18587        Self::DEFAULT.clone()
18588    }
18589}
18590impl MessageData for MAG_CAL_REPORT_DATA {
18591    type Message = MavMessage;
18592    const ID: u32 = 192u32;
18593    const NAME: &'static str = "MAG_CAL_REPORT";
18594    const EXTRA_CRC: u8 = 36u8;
18595    const ENCODED_LEN: usize = 54usize;
18596    fn deser(
18597        _version: MavlinkVersion,
18598        __input: &[u8],
18599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18600        let avail_len = __input.len();
18601        let mut payload_buf = [0; Self::ENCODED_LEN];
18602        let mut buf = if avail_len < Self::ENCODED_LEN {
18603            payload_buf[0..avail_len].copy_from_slice(__input);
18604            Bytes::new(&payload_buf)
18605        } else {
18606            Bytes::new(__input)
18607        };
18608        let mut __struct = Self::default();
18609        __struct.fitness = buf.get_f32_le();
18610        __struct.ofs_x = buf.get_f32_le();
18611        __struct.ofs_y = buf.get_f32_le();
18612        __struct.ofs_z = buf.get_f32_le();
18613        __struct.diag_x = buf.get_f32_le();
18614        __struct.diag_y = buf.get_f32_le();
18615        __struct.diag_z = buf.get_f32_le();
18616        __struct.offdiag_x = buf.get_f32_le();
18617        __struct.offdiag_y = buf.get_f32_le();
18618        __struct.offdiag_z = buf.get_f32_le();
18619        __struct.compass_id = buf.get_u8();
18620        __struct.cal_mask = buf.get_u8();
18621        let tmp = buf.get_u8();
18622        __struct.cal_status =
18623            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18624                enum_type: "MagCalStatus",
18625                value: tmp as u32,
18626            })?;
18627        __struct.autosaved = buf.get_u8();
18628        __struct.orientation_confidence = buf.get_f32_le();
18629        let tmp = buf.get_u8();
18630        __struct.old_orientation =
18631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18632                enum_type: "MavSensorOrientation",
18633                value: tmp as u32,
18634            })?;
18635        let tmp = buf.get_u8();
18636        __struct.new_orientation =
18637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18638                enum_type: "MavSensorOrientation",
18639                value: tmp as u32,
18640            })?;
18641        __struct.scale_factor = buf.get_f32_le();
18642        Ok(__struct)
18643    }
18644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18645        let mut __tmp = BytesMut::new(bytes);
18646        #[allow(clippy::absurd_extreme_comparisons)]
18647        #[allow(unused_comparisons)]
18648        if __tmp.remaining() < Self::ENCODED_LEN {
18649            panic!(
18650                "buffer is too small (need {} bytes, but got {})",
18651                Self::ENCODED_LEN,
18652                __tmp.remaining(),
18653            )
18654        }
18655        __tmp.put_f32_le(self.fitness);
18656        __tmp.put_f32_le(self.ofs_x);
18657        __tmp.put_f32_le(self.ofs_y);
18658        __tmp.put_f32_le(self.ofs_z);
18659        __tmp.put_f32_le(self.diag_x);
18660        __tmp.put_f32_le(self.diag_y);
18661        __tmp.put_f32_le(self.diag_z);
18662        __tmp.put_f32_le(self.offdiag_x);
18663        __tmp.put_f32_le(self.offdiag_y);
18664        __tmp.put_f32_le(self.offdiag_z);
18665        __tmp.put_u8(self.compass_id);
18666        __tmp.put_u8(self.cal_mask);
18667        __tmp.put_u8(self.cal_status as u8);
18668        __tmp.put_u8(self.autosaved);
18669        if matches!(version, MavlinkVersion::V2) {
18670            __tmp.put_f32_le(self.orientation_confidence);
18671            __tmp.put_u8(self.old_orientation as u8);
18672            __tmp.put_u8(self.new_orientation as u8);
18673            __tmp.put_f32_le(self.scale_factor);
18674            let len = __tmp.len();
18675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18676        } else {
18677            __tmp.len()
18678        }
18679    }
18680}
18681#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18682#[doc = ""]
18683#[doc = "ID: 69"]
18684#[derive(Debug, Clone, PartialEq)]
18685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18687#[cfg_attr(feature = "ts", derive(TS))]
18688#[cfg_attr(feature = "ts", ts(export))]
18689pub struct MANUAL_CONTROL_DATA {
18690    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18691    pub x: i16,
18692    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18693    pub y: i16,
18694    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18695    pub z: i16,
18696    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18697    pub r: i16,
18698    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18699    pub buttons: u16,
18700    #[doc = "The system to be controlled."]
18701    pub target: u8,
18702    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18704    pub buttons2: u16,
18705    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18707    pub enabled_extensions: u8,
18708    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18710    pub s: i16,
18711    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18713    pub t: i16,
18714    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18716    pub aux1: i16,
18717    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18719    pub aux2: i16,
18720    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18722    pub aux3: i16,
18723    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18725    pub aux4: i16,
18726    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18727    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18728    pub aux5: i16,
18729    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18730    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18731    pub aux6: i16,
18732}
18733impl MANUAL_CONTROL_DATA {
18734    pub const ENCODED_LEN: usize = 30usize;
18735    pub const DEFAULT: Self = Self {
18736        x: 0_i16,
18737        y: 0_i16,
18738        z: 0_i16,
18739        r: 0_i16,
18740        buttons: 0_u16,
18741        target: 0_u8,
18742        buttons2: 0_u16,
18743        enabled_extensions: 0_u8,
18744        s: 0_i16,
18745        t: 0_i16,
18746        aux1: 0_i16,
18747        aux2: 0_i16,
18748        aux3: 0_i16,
18749        aux4: 0_i16,
18750        aux5: 0_i16,
18751        aux6: 0_i16,
18752    };
18753    #[cfg(feature = "arbitrary")]
18754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18755        use arbitrary::{Arbitrary, Unstructured};
18756        let mut buf = [0u8; 1024];
18757        rng.fill_bytes(&mut buf);
18758        let mut unstructured = Unstructured::new(&buf);
18759        Self::arbitrary(&mut unstructured).unwrap_or_default()
18760    }
18761}
18762impl Default for MANUAL_CONTROL_DATA {
18763    fn default() -> Self {
18764        Self::DEFAULT.clone()
18765    }
18766}
18767impl MessageData for MANUAL_CONTROL_DATA {
18768    type Message = MavMessage;
18769    const ID: u32 = 69u32;
18770    const NAME: &'static str = "MANUAL_CONTROL";
18771    const EXTRA_CRC: u8 = 243u8;
18772    const ENCODED_LEN: usize = 30usize;
18773    fn deser(
18774        _version: MavlinkVersion,
18775        __input: &[u8],
18776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18777        let avail_len = __input.len();
18778        let mut payload_buf = [0; Self::ENCODED_LEN];
18779        let mut buf = if avail_len < Self::ENCODED_LEN {
18780            payload_buf[0..avail_len].copy_from_slice(__input);
18781            Bytes::new(&payload_buf)
18782        } else {
18783            Bytes::new(__input)
18784        };
18785        let mut __struct = Self::default();
18786        __struct.x = buf.get_i16_le();
18787        __struct.y = buf.get_i16_le();
18788        __struct.z = buf.get_i16_le();
18789        __struct.r = buf.get_i16_le();
18790        __struct.buttons = buf.get_u16_le();
18791        __struct.target = buf.get_u8();
18792        __struct.buttons2 = buf.get_u16_le();
18793        __struct.enabled_extensions = buf.get_u8();
18794        __struct.s = buf.get_i16_le();
18795        __struct.t = buf.get_i16_le();
18796        __struct.aux1 = buf.get_i16_le();
18797        __struct.aux2 = buf.get_i16_le();
18798        __struct.aux3 = buf.get_i16_le();
18799        __struct.aux4 = buf.get_i16_le();
18800        __struct.aux5 = buf.get_i16_le();
18801        __struct.aux6 = buf.get_i16_le();
18802        Ok(__struct)
18803    }
18804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18805        let mut __tmp = BytesMut::new(bytes);
18806        #[allow(clippy::absurd_extreme_comparisons)]
18807        #[allow(unused_comparisons)]
18808        if __tmp.remaining() < Self::ENCODED_LEN {
18809            panic!(
18810                "buffer is too small (need {} bytes, but got {})",
18811                Self::ENCODED_LEN,
18812                __tmp.remaining(),
18813            )
18814        }
18815        __tmp.put_i16_le(self.x);
18816        __tmp.put_i16_le(self.y);
18817        __tmp.put_i16_le(self.z);
18818        __tmp.put_i16_le(self.r);
18819        __tmp.put_u16_le(self.buttons);
18820        __tmp.put_u8(self.target);
18821        if matches!(version, MavlinkVersion::V2) {
18822            __tmp.put_u16_le(self.buttons2);
18823            __tmp.put_u8(self.enabled_extensions);
18824            __tmp.put_i16_le(self.s);
18825            __tmp.put_i16_le(self.t);
18826            __tmp.put_i16_le(self.aux1);
18827            __tmp.put_i16_le(self.aux2);
18828            __tmp.put_i16_le(self.aux3);
18829            __tmp.put_i16_le(self.aux4);
18830            __tmp.put_i16_le(self.aux5);
18831            __tmp.put_i16_le(self.aux6);
18832            let len = __tmp.len();
18833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18834        } else {
18835            __tmp.len()
18836        }
18837    }
18838}
18839#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18840#[doc = ""]
18841#[doc = "ID: 81"]
18842#[derive(Debug, Clone, PartialEq)]
18843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18845#[cfg_attr(feature = "ts", derive(TS))]
18846#[cfg_attr(feature = "ts", ts(export))]
18847pub struct MANUAL_SETPOINT_DATA {
18848    #[doc = "Timestamp (time since system boot)."]
18849    pub time_boot_ms: u32,
18850    #[doc = "Desired roll rate"]
18851    pub roll: f32,
18852    #[doc = "Desired pitch rate"]
18853    pub pitch: f32,
18854    #[doc = "Desired yaw rate"]
18855    pub yaw: f32,
18856    #[doc = "Collective thrust, normalized to 0 .. 1"]
18857    pub thrust: f32,
18858    #[doc = "Flight mode switch position, 0.. 255"]
18859    pub mode_switch: u8,
18860    #[doc = "Override mode switch position, 0.. 255"]
18861    pub manual_override_switch: u8,
18862}
18863impl MANUAL_SETPOINT_DATA {
18864    pub const ENCODED_LEN: usize = 22usize;
18865    pub const DEFAULT: Self = Self {
18866        time_boot_ms: 0_u32,
18867        roll: 0.0_f32,
18868        pitch: 0.0_f32,
18869        yaw: 0.0_f32,
18870        thrust: 0.0_f32,
18871        mode_switch: 0_u8,
18872        manual_override_switch: 0_u8,
18873    };
18874    #[cfg(feature = "arbitrary")]
18875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18876        use arbitrary::{Arbitrary, Unstructured};
18877        let mut buf = [0u8; 1024];
18878        rng.fill_bytes(&mut buf);
18879        let mut unstructured = Unstructured::new(&buf);
18880        Self::arbitrary(&mut unstructured).unwrap_or_default()
18881    }
18882}
18883impl Default for MANUAL_SETPOINT_DATA {
18884    fn default() -> Self {
18885        Self::DEFAULT.clone()
18886    }
18887}
18888impl MessageData for MANUAL_SETPOINT_DATA {
18889    type Message = MavMessage;
18890    const ID: u32 = 81u32;
18891    const NAME: &'static str = "MANUAL_SETPOINT";
18892    const EXTRA_CRC: u8 = 106u8;
18893    const ENCODED_LEN: usize = 22usize;
18894    fn deser(
18895        _version: MavlinkVersion,
18896        __input: &[u8],
18897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18898        let avail_len = __input.len();
18899        let mut payload_buf = [0; Self::ENCODED_LEN];
18900        let mut buf = if avail_len < Self::ENCODED_LEN {
18901            payload_buf[0..avail_len].copy_from_slice(__input);
18902            Bytes::new(&payload_buf)
18903        } else {
18904            Bytes::new(__input)
18905        };
18906        let mut __struct = Self::default();
18907        __struct.time_boot_ms = buf.get_u32_le();
18908        __struct.roll = buf.get_f32_le();
18909        __struct.pitch = buf.get_f32_le();
18910        __struct.yaw = buf.get_f32_le();
18911        __struct.thrust = buf.get_f32_le();
18912        __struct.mode_switch = buf.get_u8();
18913        __struct.manual_override_switch = buf.get_u8();
18914        Ok(__struct)
18915    }
18916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18917        let mut __tmp = BytesMut::new(bytes);
18918        #[allow(clippy::absurd_extreme_comparisons)]
18919        #[allow(unused_comparisons)]
18920        if __tmp.remaining() < Self::ENCODED_LEN {
18921            panic!(
18922                "buffer is too small (need {} bytes, but got {})",
18923                Self::ENCODED_LEN,
18924                __tmp.remaining(),
18925            )
18926        }
18927        __tmp.put_u32_le(self.time_boot_ms);
18928        __tmp.put_f32_le(self.roll);
18929        __tmp.put_f32_le(self.pitch);
18930        __tmp.put_f32_le(self.yaw);
18931        __tmp.put_f32_le(self.thrust);
18932        __tmp.put_u8(self.mode_switch);
18933        __tmp.put_u8(self.manual_override_switch);
18934        if matches!(version, MavlinkVersion::V2) {
18935            let len = __tmp.len();
18936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18937        } else {
18938            __tmp.len()
18939        }
18940    }
18941}
18942#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18943#[doc = ""]
18944#[doc = "ID: 249"]
18945#[derive(Debug, Clone, PartialEq)]
18946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18948#[cfg_attr(feature = "ts", derive(TS))]
18949#[cfg_attr(feature = "ts", ts(export))]
18950pub struct MEMORY_VECT_DATA {
18951    #[doc = "Starting address of the debug variables"]
18952    pub address: u16,
18953    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18954    pub ver: u8,
18955    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18956    pub mavtype: u8,
18957    #[doc = "Memory contents at specified address"]
18958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18959    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18960    pub value: [i8; 32],
18961}
18962impl MEMORY_VECT_DATA {
18963    pub const ENCODED_LEN: usize = 36usize;
18964    pub const DEFAULT: Self = Self {
18965        address: 0_u16,
18966        ver: 0_u8,
18967        mavtype: 0_u8,
18968        value: [0_i8; 32usize],
18969    };
18970    #[cfg(feature = "arbitrary")]
18971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18972        use arbitrary::{Arbitrary, Unstructured};
18973        let mut buf = [0u8; 1024];
18974        rng.fill_bytes(&mut buf);
18975        let mut unstructured = Unstructured::new(&buf);
18976        Self::arbitrary(&mut unstructured).unwrap_or_default()
18977    }
18978}
18979impl Default for MEMORY_VECT_DATA {
18980    fn default() -> Self {
18981        Self::DEFAULT.clone()
18982    }
18983}
18984impl MessageData for MEMORY_VECT_DATA {
18985    type Message = MavMessage;
18986    const ID: u32 = 249u32;
18987    const NAME: &'static str = "MEMORY_VECT";
18988    const EXTRA_CRC: u8 = 204u8;
18989    const ENCODED_LEN: usize = 36usize;
18990    fn deser(
18991        _version: MavlinkVersion,
18992        __input: &[u8],
18993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18994        let avail_len = __input.len();
18995        let mut payload_buf = [0; Self::ENCODED_LEN];
18996        let mut buf = if avail_len < Self::ENCODED_LEN {
18997            payload_buf[0..avail_len].copy_from_slice(__input);
18998            Bytes::new(&payload_buf)
18999        } else {
19000            Bytes::new(__input)
19001        };
19002        let mut __struct = Self::default();
19003        __struct.address = buf.get_u16_le();
19004        __struct.ver = buf.get_u8();
19005        __struct.mavtype = buf.get_u8();
19006        for v in &mut __struct.value {
19007            let val = buf.get_i8();
19008            *v = val;
19009        }
19010        Ok(__struct)
19011    }
19012    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19013        let mut __tmp = BytesMut::new(bytes);
19014        #[allow(clippy::absurd_extreme_comparisons)]
19015        #[allow(unused_comparisons)]
19016        if __tmp.remaining() < Self::ENCODED_LEN {
19017            panic!(
19018                "buffer is too small (need {} bytes, but got {})",
19019                Self::ENCODED_LEN,
19020                __tmp.remaining(),
19021            )
19022        }
19023        __tmp.put_u16_le(self.address);
19024        __tmp.put_u8(self.ver);
19025        __tmp.put_u8(self.mavtype);
19026        for val in &self.value {
19027            __tmp.put_i8(*val);
19028        }
19029        if matches!(version, MavlinkVersion::V2) {
19030            let len = __tmp.len();
19031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19032        } else {
19033            __tmp.len()
19034        }
19035    }
19036}
19037#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19038#[doc = ""]
19039#[doc = "ID: 244"]
19040#[derive(Debug, Clone, PartialEq)]
19041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19043#[cfg_attr(feature = "ts", derive(TS))]
19044#[cfg_attr(feature = "ts", ts(export))]
19045pub struct MESSAGE_INTERVAL_DATA {
19046    #[doc = "0 indicates the interval at which it is sent."]
19047    pub interval_us: i32,
19048    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19049    pub message_id: u16,
19050}
19051impl MESSAGE_INTERVAL_DATA {
19052    pub const ENCODED_LEN: usize = 6usize;
19053    pub const DEFAULT: Self = Self {
19054        interval_us: 0_i32,
19055        message_id: 0_u16,
19056    };
19057    #[cfg(feature = "arbitrary")]
19058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19059        use arbitrary::{Arbitrary, Unstructured};
19060        let mut buf = [0u8; 1024];
19061        rng.fill_bytes(&mut buf);
19062        let mut unstructured = Unstructured::new(&buf);
19063        Self::arbitrary(&mut unstructured).unwrap_or_default()
19064    }
19065}
19066impl Default for MESSAGE_INTERVAL_DATA {
19067    fn default() -> Self {
19068        Self::DEFAULT.clone()
19069    }
19070}
19071impl MessageData for MESSAGE_INTERVAL_DATA {
19072    type Message = MavMessage;
19073    const ID: u32 = 244u32;
19074    const NAME: &'static str = "MESSAGE_INTERVAL";
19075    const EXTRA_CRC: u8 = 95u8;
19076    const ENCODED_LEN: usize = 6usize;
19077    fn deser(
19078        _version: MavlinkVersion,
19079        __input: &[u8],
19080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19081        let avail_len = __input.len();
19082        let mut payload_buf = [0; Self::ENCODED_LEN];
19083        let mut buf = if avail_len < Self::ENCODED_LEN {
19084            payload_buf[0..avail_len].copy_from_slice(__input);
19085            Bytes::new(&payload_buf)
19086        } else {
19087            Bytes::new(__input)
19088        };
19089        let mut __struct = Self::default();
19090        __struct.interval_us = buf.get_i32_le();
19091        __struct.message_id = buf.get_u16_le();
19092        Ok(__struct)
19093    }
19094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19095        let mut __tmp = BytesMut::new(bytes);
19096        #[allow(clippy::absurd_extreme_comparisons)]
19097        #[allow(unused_comparisons)]
19098        if __tmp.remaining() < Self::ENCODED_LEN {
19099            panic!(
19100                "buffer is too small (need {} bytes, but got {})",
19101                Self::ENCODED_LEN,
19102                __tmp.remaining(),
19103            )
19104        }
19105        __tmp.put_i32_le(self.interval_us);
19106        __tmp.put_u16_le(self.message_id);
19107        if matches!(version, MavlinkVersion::V2) {
19108            let len = __tmp.len();
19109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19110        } else {
19111            __tmp.len()
19112        }
19113    }
19114}
19115#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19116#[doc = ""]
19117#[doc = "ID: 47"]
19118#[derive(Debug, Clone, PartialEq)]
19119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19121#[cfg_attr(feature = "ts", derive(TS))]
19122#[cfg_attr(feature = "ts", ts(export))]
19123pub struct MISSION_ACK_DATA {
19124    #[doc = "System ID"]
19125    pub target_system: u8,
19126    #[doc = "Component ID"]
19127    pub target_component: u8,
19128    #[doc = "Mission result."]
19129    pub mavtype: MavMissionResult,
19130    #[doc = "Mission type."]
19131    #[cfg_attr(feature = "serde", serde(default))]
19132    pub mission_type: MavMissionType,
19133    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19134    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19135    pub opaque_id: u32,
19136}
19137impl MISSION_ACK_DATA {
19138    pub const ENCODED_LEN: usize = 8usize;
19139    pub const DEFAULT: Self = Self {
19140        target_system: 0_u8,
19141        target_component: 0_u8,
19142        mavtype: MavMissionResult::DEFAULT,
19143        mission_type: MavMissionType::DEFAULT,
19144        opaque_id: 0_u32,
19145    };
19146    #[cfg(feature = "arbitrary")]
19147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19148        use arbitrary::{Arbitrary, Unstructured};
19149        let mut buf = [0u8; 1024];
19150        rng.fill_bytes(&mut buf);
19151        let mut unstructured = Unstructured::new(&buf);
19152        Self::arbitrary(&mut unstructured).unwrap_or_default()
19153    }
19154}
19155impl Default for MISSION_ACK_DATA {
19156    fn default() -> Self {
19157        Self::DEFAULT.clone()
19158    }
19159}
19160impl MessageData for MISSION_ACK_DATA {
19161    type Message = MavMessage;
19162    const ID: u32 = 47u32;
19163    const NAME: &'static str = "MISSION_ACK";
19164    const EXTRA_CRC: u8 = 153u8;
19165    const ENCODED_LEN: usize = 8usize;
19166    fn deser(
19167        _version: MavlinkVersion,
19168        __input: &[u8],
19169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19170        let avail_len = __input.len();
19171        let mut payload_buf = [0; Self::ENCODED_LEN];
19172        let mut buf = if avail_len < Self::ENCODED_LEN {
19173            payload_buf[0..avail_len].copy_from_slice(__input);
19174            Bytes::new(&payload_buf)
19175        } else {
19176            Bytes::new(__input)
19177        };
19178        let mut __struct = Self::default();
19179        __struct.target_system = buf.get_u8();
19180        __struct.target_component = buf.get_u8();
19181        let tmp = buf.get_u8();
19182        __struct.mavtype =
19183            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19184                enum_type: "MavMissionResult",
19185                value: tmp as u32,
19186            })?;
19187        let tmp = buf.get_u8();
19188        __struct.mission_type =
19189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19190                enum_type: "MavMissionType",
19191                value: tmp as u32,
19192            })?;
19193        __struct.opaque_id = buf.get_u32_le();
19194        Ok(__struct)
19195    }
19196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19197        let mut __tmp = BytesMut::new(bytes);
19198        #[allow(clippy::absurd_extreme_comparisons)]
19199        #[allow(unused_comparisons)]
19200        if __tmp.remaining() < Self::ENCODED_LEN {
19201            panic!(
19202                "buffer is too small (need {} bytes, but got {})",
19203                Self::ENCODED_LEN,
19204                __tmp.remaining(),
19205            )
19206        }
19207        __tmp.put_u8(self.target_system);
19208        __tmp.put_u8(self.target_component);
19209        __tmp.put_u8(self.mavtype as u8);
19210        if matches!(version, MavlinkVersion::V2) {
19211            __tmp.put_u8(self.mission_type as u8);
19212            __tmp.put_u32_le(self.opaque_id);
19213            let len = __tmp.len();
19214            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19215        } else {
19216            __tmp.len()
19217        }
19218    }
19219}
19220#[doc = "Delete all mission items at once."]
19221#[doc = ""]
19222#[doc = "ID: 45"]
19223#[derive(Debug, Clone, PartialEq)]
19224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19226#[cfg_attr(feature = "ts", derive(TS))]
19227#[cfg_attr(feature = "ts", ts(export))]
19228pub struct MISSION_CLEAR_ALL_DATA {
19229    #[doc = "System ID"]
19230    pub target_system: u8,
19231    #[doc = "Component ID"]
19232    pub target_component: u8,
19233    #[doc = "Mission type."]
19234    #[cfg_attr(feature = "serde", serde(default))]
19235    pub mission_type: MavMissionType,
19236}
19237impl MISSION_CLEAR_ALL_DATA {
19238    pub const ENCODED_LEN: usize = 3usize;
19239    pub const DEFAULT: Self = Self {
19240        target_system: 0_u8,
19241        target_component: 0_u8,
19242        mission_type: MavMissionType::DEFAULT,
19243    };
19244    #[cfg(feature = "arbitrary")]
19245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19246        use arbitrary::{Arbitrary, Unstructured};
19247        let mut buf = [0u8; 1024];
19248        rng.fill_bytes(&mut buf);
19249        let mut unstructured = Unstructured::new(&buf);
19250        Self::arbitrary(&mut unstructured).unwrap_or_default()
19251    }
19252}
19253impl Default for MISSION_CLEAR_ALL_DATA {
19254    fn default() -> Self {
19255        Self::DEFAULT.clone()
19256    }
19257}
19258impl MessageData for MISSION_CLEAR_ALL_DATA {
19259    type Message = MavMessage;
19260    const ID: u32 = 45u32;
19261    const NAME: &'static str = "MISSION_CLEAR_ALL";
19262    const EXTRA_CRC: u8 = 232u8;
19263    const ENCODED_LEN: usize = 3usize;
19264    fn deser(
19265        _version: MavlinkVersion,
19266        __input: &[u8],
19267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19268        let avail_len = __input.len();
19269        let mut payload_buf = [0; Self::ENCODED_LEN];
19270        let mut buf = if avail_len < Self::ENCODED_LEN {
19271            payload_buf[0..avail_len].copy_from_slice(__input);
19272            Bytes::new(&payload_buf)
19273        } else {
19274            Bytes::new(__input)
19275        };
19276        let mut __struct = Self::default();
19277        __struct.target_system = buf.get_u8();
19278        __struct.target_component = buf.get_u8();
19279        let tmp = buf.get_u8();
19280        __struct.mission_type =
19281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19282                enum_type: "MavMissionType",
19283                value: tmp as u32,
19284            })?;
19285        Ok(__struct)
19286    }
19287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19288        let mut __tmp = BytesMut::new(bytes);
19289        #[allow(clippy::absurd_extreme_comparisons)]
19290        #[allow(unused_comparisons)]
19291        if __tmp.remaining() < Self::ENCODED_LEN {
19292            panic!(
19293                "buffer is too small (need {} bytes, but got {})",
19294                Self::ENCODED_LEN,
19295                __tmp.remaining(),
19296            )
19297        }
19298        __tmp.put_u8(self.target_system);
19299        __tmp.put_u8(self.target_component);
19300        if matches!(version, MavlinkVersion::V2) {
19301            __tmp.put_u8(self.mission_type as u8);
19302            let len = __tmp.len();
19303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19304        } else {
19305            __tmp.len()
19306        }
19307    }
19308}
19309#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19310#[doc = ""]
19311#[doc = "ID: 44"]
19312#[derive(Debug, Clone, PartialEq)]
19313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19315#[cfg_attr(feature = "ts", derive(TS))]
19316#[cfg_attr(feature = "ts", ts(export))]
19317pub struct MISSION_COUNT_DATA {
19318    #[doc = "Number of mission items in the sequence"]
19319    pub count: u16,
19320    #[doc = "System ID"]
19321    pub target_system: u8,
19322    #[doc = "Component ID"]
19323    pub target_component: u8,
19324    #[doc = "Mission type."]
19325    #[cfg_attr(feature = "serde", serde(default))]
19326    pub mission_type: MavMissionType,
19327    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19329    pub opaque_id: u32,
19330}
19331impl MISSION_COUNT_DATA {
19332    pub const ENCODED_LEN: usize = 9usize;
19333    pub const DEFAULT: Self = Self {
19334        count: 0_u16,
19335        target_system: 0_u8,
19336        target_component: 0_u8,
19337        mission_type: MavMissionType::DEFAULT,
19338        opaque_id: 0_u32,
19339    };
19340    #[cfg(feature = "arbitrary")]
19341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19342        use arbitrary::{Arbitrary, Unstructured};
19343        let mut buf = [0u8; 1024];
19344        rng.fill_bytes(&mut buf);
19345        let mut unstructured = Unstructured::new(&buf);
19346        Self::arbitrary(&mut unstructured).unwrap_or_default()
19347    }
19348}
19349impl Default for MISSION_COUNT_DATA {
19350    fn default() -> Self {
19351        Self::DEFAULT.clone()
19352    }
19353}
19354impl MessageData for MISSION_COUNT_DATA {
19355    type Message = MavMessage;
19356    const ID: u32 = 44u32;
19357    const NAME: &'static str = "MISSION_COUNT";
19358    const EXTRA_CRC: u8 = 221u8;
19359    const ENCODED_LEN: usize = 9usize;
19360    fn deser(
19361        _version: MavlinkVersion,
19362        __input: &[u8],
19363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19364        let avail_len = __input.len();
19365        let mut payload_buf = [0; Self::ENCODED_LEN];
19366        let mut buf = if avail_len < Self::ENCODED_LEN {
19367            payload_buf[0..avail_len].copy_from_slice(__input);
19368            Bytes::new(&payload_buf)
19369        } else {
19370            Bytes::new(__input)
19371        };
19372        let mut __struct = Self::default();
19373        __struct.count = buf.get_u16_le();
19374        __struct.target_system = buf.get_u8();
19375        __struct.target_component = buf.get_u8();
19376        let tmp = buf.get_u8();
19377        __struct.mission_type =
19378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19379                enum_type: "MavMissionType",
19380                value: tmp as u32,
19381            })?;
19382        __struct.opaque_id = buf.get_u32_le();
19383        Ok(__struct)
19384    }
19385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19386        let mut __tmp = BytesMut::new(bytes);
19387        #[allow(clippy::absurd_extreme_comparisons)]
19388        #[allow(unused_comparisons)]
19389        if __tmp.remaining() < Self::ENCODED_LEN {
19390            panic!(
19391                "buffer is too small (need {} bytes, but got {})",
19392                Self::ENCODED_LEN,
19393                __tmp.remaining(),
19394            )
19395        }
19396        __tmp.put_u16_le(self.count);
19397        __tmp.put_u8(self.target_system);
19398        __tmp.put_u8(self.target_component);
19399        if matches!(version, MavlinkVersion::V2) {
19400            __tmp.put_u8(self.mission_type as u8);
19401            __tmp.put_u32_le(self.opaque_id);
19402            let len = __tmp.len();
19403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19404        } else {
19405            __tmp.len()
19406        }
19407    }
19408}
19409#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19410#[doc = ""]
19411#[doc = "ID: 42"]
19412#[derive(Debug, Clone, PartialEq)]
19413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19415#[cfg_attr(feature = "ts", derive(TS))]
19416#[cfg_attr(feature = "ts", ts(export))]
19417pub struct MISSION_CURRENT_DATA {
19418    #[doc = "Sequence"]
19419    pub seq: u16,
19420    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19422    pub total: u16,
19423    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19424    #[cfg_attr(feature = "serde", serde(default))]
19425    pub mission_state: MissionState,
19426    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19428    pub mission_mode: u8,
19429    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19431    pub mission_id: u32,
19432    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19434    pub fence_id: u32,
19435    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19437    pub rally_points_id: u32,
19438}
19439impl MISSION_CURRENT_DATA {
19440    pub const ENCODED_LEN: usize = 18usize;
19441    pub const DEFAULT: Self = Self {
19442        seq: 0_u16,
19443        total: 0_u16,
19444        mission_state: MissionState::DEFAULT,
19445        mission_mode: 0_u8,
19446        mission_id: 0_u32,
19447        fence_id: 0_u32,
19448        rally_points_id: 0_u32,
19449    };
19450    #[cfg(feature = "arbitrary")]
19451    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19452        use arbitrary::{Arbitrary, Unstructured};
19453        let mut buf = [0u8; 1024];
19454        rng.fill_bytes(&mut buf);
19455        let mut unstructured = Unstructured::new(&buf);
19456        Self::arbitrary(&mut unstructured).unwrap_or_default()
19457    }
19458}
19459impl Default for MISSION_CURRENT_DATA {
19460    fn default() -> Self {
19461        Self::DEFAULT.clone()
19462    }
19463}
19464impl MessageData for MISSION_CURRENT_DATA {
19465    type Message = MavMessage;
19466    const ID: u32 = 42u32;
19467    const NAME: &'static str = "MISSION_CURRENT";
19468    const EXTRA_CRC: u8 = 28u8;
19469    const ENCODED_LEN: usize = 18usize;
19470    fn deser(
19471        _version: MavlinkVersion,
19472        __input: &[u8],
19473    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19474        let avail_len = __input.len();
19475        let mut payload_buf = [0; Self::ENCODED_LEN];
19476        let mut buf = if avail_len < Self::ENCODED_LEN {
19477            payload_buf[0..avail_len].copy_from_slice(__input);
19478            Bytes::new(&payload_buf)
19479        } else {
19480            Bytes::new(__input)
19481        };
19482        let mut __struct = Self::default();
19483        __struct.seq = buf.get_u16_le();
19484        __struct.total = buf.get_u16_le();
19485        let tmp = buf.get_u8();
19486        __struct.mission_state =
19487            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19488                enum_type: "MissionState",
19489                value: tmp as u32,
19490            })?;
19491        __struct.mission_mode = buf.get_u8();
19492        __struct.mission_id = buf.get_u32_le();
19493        __struct.fence_id = buf.get_u32_le();
19494        __struct.rally_points_id = buf.get_u32_le();
19495        Ok(__struct)
19496    }
19497    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19498        let mut __tmp = BytesMut::new(bytes);
19499        #[allow(clippy::absurd_extreme_comparisons)]
19500        #[allow(unused_comparisons)]
19501        if __tmp.remaining() < Self::ENCODED_LEN {
19502            panic!(
19503                "buffer is too small (need {} bytes, but got {})",
19504                Self::ENCODED_LEN,
19505                __tmp.remaining(),
19506            )
19507        }
19508        __tmp.put_u16_le(self.seq);
19509        if matches!(version, MavlinkVersion::V2) {
19510            __tmp.put_u16_le(self.total);
19511            __tmp.put_u8(self.mission_state as u8);
19512            __tmp.put_u8(self.mission_mode);
19513            __tmp.put_u32_le(self.mission_id);
19514            __tmp.put_u32_le(self.fence_id);
19515            __tmp.put_u32_le(self.rally_points_id);
19516            let len = __tmp.len();
19517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19518        } else {
19519            __tmp.len()
19520        }
19521    }
19522}
19523#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19524#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19525#[doc = ""]
19526#[doc = "ID: 39"]
19527#[derive(Debug, Clone, PartialEq)]
19528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19530#[cfg_attr(feature = "ts", derive(TS))]
19531#[cfg_attr(feature = "ts", ts(export))]
19532pub struct MISSION_ITEM_DATA {
19533    #[doc = "PARAM1, see MAV_CMD enum"]
19534    pub param1: f32,
19535    #[doc = "PARAM2, see MAV_CMD enum"]
19536    pub param2: f32,
19537    #[doc = "PARAM3, see MAV_CMD enum"]
19538    pub param3: f32,
19539    #[doc = "PARAM4, see MAV_CMD enum"]
19540    pub param4: f32,
19541    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19542    pub x: f32,
19543    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19544    pub y: f32,
19545    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19546    pub z: f32,
19547    #[doc = "Sequence"]
19548    pub seq: u16,
19549    #[doc = "The scheduled action for the waypoint."]
19550    pub command: MavCmd,
19551    #[doc = "System ID"]
19552    pub target_system: u8,
19553    #[doc = "Component ID"]
19554    pub target_component: u8,
19555    #[doc = "The coordinate system of the waypoint."]
19556    pub frame: MavFrame,
19557    #[doc = "false:0, true:1"]
19558    pub current: u8,
19559    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19560    pub autocontinue: u8,
19561    #[doc = "Mission type."]
19562    #[cfg_attr(feature = "serde", serde(default))]
19563    pub mission_type: MavMissionType,
19564}
19565impl MISSION_ITEM_DATA {
19566    pub const ENCODED_LEN: usize = 38usize;
19567    pub const DEFAULT: Self = Self {
19568        param1: 0.0_f32,
19569        param2: 0.0_f32,
19570        param3: 0.0_f32,
19571        param4: 0.0_f32,
19572        x: 0.0_f32,
19573        y: 0.0_f32,
19574        z: 0.0_f32,
19575        seq: 0_u16,
19576        command: MavCmd::DEFAULT,
19577        target_system: 0_u8,
19578        target_component: 0_u8,
19579        frame: MavFrame::DEFAULT,
19580        current: 0_u8,
19581        autocontinue: 0_u8,
19582        mission_type: MavMissionType::DEFAULT,
19583    };
19584    #[cfg(feature = "arbitrary")]
19585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19586        use arbitrary::{Arbitrary, Unstructured};
19587        let mut buf = [0u8; 1024];
19588        rng.fill_bytes(&mut buf);
19589        let mut unstructured = Unstructured::new(&buf);
19590        Self::arbitrary(&mut unstructured).unwrap_or_default()
19591    }
19592}
19593impl Default for MISSION_ITEM_DATA {
19594    fn default() -> Self {
19595        Self::DEFAULT.clone()
19596    }
19597}
19598impl MessageData for MISSION_ITEM_DATA {
19599    type Message = MavMessage;
19600    const ID: u32 = 39u32;
19601    const NAME: &'static str = "MISSION_ITEM";
19602    const EXTRA_CRC: u8 = 254u8;
19603    const ENCODED_LEN: usize = 38usize;
19604    fn deser(
19605        _version: MavlinkVersion,
19606        __input: &[u8],
19607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19608        let avail_len = __input.len();
19609        let mut payload_buf = [0; Self::ENCODED_LEN];
19610        let mut buf = if avail_len < Self::ENCODED_LEN {
19611            payload_buf[0..avail_len].copy_from_slice(__input);
19612            Bytes::new(&payload_buf)
19613        } else {
19614            Bytes::new(__input)
19615        };
19616        let mut __struct = Self::default();
19617        __struct.param1 = buf.get_f32_le();
19618        __struct.param2 = buf.get_f32_le();
19619        __struct.param3 = buf.get_f32_le();
19620        __struct.param4 = buf.get_f32_le();
19621        __struct.x = buf.get_f32_le();
19622        __struct.y = buf.get_f32_le();
19623        __struct.z = buf.get_f32_le();
19624        __struct.seq = buf.get_u16_le();
19625        let tmp = buf.get_u16_le();
19626        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19627            ::mavlink_core::error::ParserError::InvalidEnum {
19628                enum_type: "MavCmd",
19629                value: tmp as u32,
19630            },
19631        )?;
19632        __struct.target_system = buf.get_u8();
19633        __struct.target_component = buf.get_u8();
19634        let tmp = buf.get_u8();
19635        __struct.frame =
19636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19637                enum_type: "MavFrame",
19638                value: tmp as u32,
19639            })?;
19640        __struct.current = buf.get_u8();
19641        __struct.autocontinue = buf.get_u8();
19642        let tmp = buf.get_u8();
19643        __struct.mission_type =
19644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19645                enum_type: "MavMissionType",
19646                value: tmp as u32,
19647            })?;
19648        Ok(__struct)
19649    }
19650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19651        let mut __tmp = BytesMut::new(bytes);
19652        #[allow(clippy::absurd_extreme_comparisons)]
19653        #[allow(unused_comparisons)]
19654        if __tmp.remaining() < Self::ENCODED_LEN {
19655            panic!(
19656                "buffer is too small (need {} bytes, but got {})",
19657                Self::ENCODED_LEN,
19658                __tmp.remaining(),
19659            )
19660        }
19661        __tmp.put_f32_le(self.param1);
19662        __tmp.put_f32_le(self.param2);
19663        __tmp.put_f32_le(self.param3);
19664        __tmp.put_f32_le(self.param4);
19665        __tmp.put_f32_le(self.x);
19666        __tmp.put_f32_le(self.y);
19667        __tmp.put_f32_le(self.z);
19668        __tmp.put_u16_le(self.seq);
19669        __tmp.put_u16_le(self.command as u16);
19670        __tmp.put_u8(self.target_system);
19671        __tmp.put_u8(self.target_component);
19672        __tmp.put_u8(self.frame as u8);
19673        __tmp.put_u8(self.current);
19674        __tmp.put_u8(self.autocontinue);
19675        if matches!(version, MavlinkVersion::V2) {
19676            __tmp.put_u8(self.mission_type as u8);
19677            let len = __tmp.len();
19678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19679        } else {
19680            __tmp.len()
19681        }
19682    }
19683}
19684#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19685#[doc = ""]
19686#[doc = "ID: 73"]
19687#[derive(Debug, Clone, PartialEq)]
19688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19690#[cfg_attr(feature = "ts", derive(TS))]
19691#[cfg_attr(feature = "ts", ts(export))]
19692pub struct MISSION_ITEM_INT_DATA {
19693    #[doc = "PARAM1, see MAV_CMD enum"]
19694    pub param1: f32,
19695    #[doc = "PARAM2, see MAV_CMD enum"]
19696    pub param2: f32,
19697    #[doc = "PARAM3, see MAV_CMD enum"]
19698    pub param3: f32,
19699    #[doc = "PARAM4, see MAV_CMD enum"]
19700    pub param4: f32,
19701    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19702    pub x: i32,
19703    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19704    pub y: i32,
19705    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19706    pub z: f32,
19707    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19708    pub seq: u16,
19709    #[doc = "The scheduled action for the waypoint."]
19710    pub command: MavCmd,
19711    #[doc = "System ID"]
19712    pub target_system: u8,
19713    #[doc = "Component ID"]
19714    pub target_component: u8,
19715    #[doc = "The coordinate system of the waypoint."]
19716    pub frame: MavFrame,
19717    #[doc = "false:0, true:1"]
19718    pub current: u8,
19719    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19720    pub autocontinue: u8,
19721    #[doc = "Mission type."]
19722    #[cfg_attr(feature = "serde", serde(default))]
19723    pub mission_type: MavMissionType,
19724}
19725impl MISSION_ITEM_INT_DATA {
19726    pub const ENCODED_LEN: usize = 38usize;
19727    pub const DEFAULT: Self = Self {
19728        param1: 0.0_f32,
19729        param2: 0.0_f32,
19730        param3: 0.0_f32,
19731        param4: 0.0_f32,
19732        x: 0_i32,
19733        y: 0_i32,
19734        z: 0.0_f32,
19735        seq: 0_u16,
19736        command: MavCmd::DEFAULT,
19737        target_system: 0_u8,
19738        target_component: 0_u8,
19739        frame: MavFrame::DEFAULT,
19740        current: 0_u8,
19741        autocontinue: 0_u8,
19742        mission_type: MavMissionType::DEFAULT,
19743    };
19744    #[cfg(feature = "arbitrary")]
19745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19746        use arbitrary::{Arbitrary, Unstructured};
19747        let mut buf = [0u8; 1024];
19748        rng.fill_bytes(&mut buf);
19749        let mut unstructured = Unstructured::new(&buf);
19750        Self::arbitrary(&mut unstructured).unwrap_or_default()
19751    }
19752}
19753impl Default for MISSION_ITEM_INT_DATA {
19754    fn default() -> Self {
19755        Self::DEFAULT.clone()
19756    }
19757}
19758impl MessageData for MISSION_ITEM_INT_DATA {
19759    type Message = MavMessage;
19760    const ID: u32 = 73u32;
19761    const NAME: &'static str = "MISSION_ITEM_INT";
19762    const EXTRA_CRC: u8 = 38u8;
19763    const ENCODED_LEN: usize = 38usize;
19764    fn deser(
19765        _version: MavlinkVersion,
19766        __input: &[u8],
19767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19768        let avail_len = __input.len();
19769        let mut payload_buf = [0; Self::ENCODED_LEN];
19770        let mut buf = if avail_len < Self::ENCODED_LEN {
19771            payload_buf[0..avail_len].copy_from_slice(__input);
19772            Bytes::new(&payload_buf)
19773        } else {
19774            Bytes::new(__input)
19775        };
19776        let mut __struct = Self::default();
19777        __struct.param1 = buf.get_f32_le();
19778        __struct.param2 = buf.get_f32_le();
19779        __struct.param3 = buf.get_f32_le();
19780        __struct.param4 = buf.get_f32_le();
19781        __struct.x = buf.get_i32_le();
19782        __struct.y = buf.get_i32_le();
19783        __struct.z = buf.get_f32_le();
19784        __struct.seq = buf.get_u16_le();
19785        let tmp = buf.get_u16_le();
19786        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19787            ::mavlink_core::error::ParserError::InvalidEnum {
19788                enum_type: "MavCmd",
19789                value: tmp as u32,
19790            },
19791        )?;
19792        __struct.target_system = buf.get_u8();
19793        __struct.target_component = buf.get_u8();
19794        let tmp = buf.get_u8();
19795        __struct.frame =
19796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19797                enum_type: "MavFrame",
19798                value: tmp as u32,
19799            })?;
19800        __struct.current = buf.get_u8();
19801        __struct.autocontinue = buf.get_u8();
19802        let tmp = buf.get_u8();
19803        __struct.mission_type =
19804            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19805                enum_type: "MavMissionType",
19806                value: tmp as u32,
19807            })?;
19808        Ok(__struct)
19809    }
19810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19811        let mut __tmp = BytesMut::new(bytes);
19812        #[allow(clippy::absurd_extreme_comparisons)]
19813        #[allow(unused_comparisons)]
19814        if __tmp.remaining() < Self::ENCODED_LEN {
19815            panic!(
19816                "buffer is too small (need {} bytes, but got {})",
19817                Self::ENCODED_LEN,
19818                __tmp.remaining(),
19819            )
19820        }
19821        __tmp.put_f32_le(self.param1);
19822        __tmp.put_f32_le(self.param2);
19823        __tmp.put_f32_le(self.param3);
19824        __tmp.put_f32_le(self.param4);
19825        __tmp.put_i32_le(self.x);
19826        __tmp.put_i32_le(self.y);
19827        __tmp.put_f32_le(self.z);
19828        __tmp.put_u16_le(self.seq);
19829        __tmp.put_u16_le(self.command as u16);
19830        __tmp.put_u8(self.target_system);
19831        __tmp.put_u8(self.target_component);
19832        __tmp.put_u8(self.frame as u8);
19833        __tmp.put_u8(self.current);
19834        __tmp.put_u8(self.autocontinue);
19835        if matches!(version, MavlinkVersion::V2) {
19836            __tmp.put_u8(self.mission_type as u8);
19837            let len = __tmp.len();
19838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19839        } else {
19840            __tmp.len()
19841        }
19842    }
19843}
19844#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19845#[doc = ""]
19846#[doc = "ID: 46"]
19847#[derive(Debug, Clone, PartialEq)]
19848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19850#[cfg_attr(feature = "ts", derive(TS))]
19851#[cfg_attr(feature = "ts", ts(export))]
19852pub struct MISSION_ITEM_REACHED_DATA {
19853    #[doc = "Sequence"]
19854    pub seq: u16,
19855}
19856impl MISSION_ITEM_REACHED_DATA {
19857    pub const ENCODED_LEN: usize = 2usize;
19858    pub const DEFAULT: Self = Self { seq: 0_u16 };
19859    #[cfg(feature = "arbitrary")]
19860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19861        use arbitrary::{Arbitrary, Unstructured};
19862        let mut buf = [0u8; 1024];
19863        rng.fill_bytes(&mut buf);
19864        let mut unstructured = Unstructured::new(&buf);
19865        Self::arbitrary(&mut unstructured).unwrap_or_default()
19866    }
19867}
19868impl Default for MISSION_ITEM_REACHED_DATA {
19869    fn default() -> Self {
19870        Self::DEFAULT.clone()
19871    }
19872}
19873impl MessageData for MISSION_ITEM_REACHED_DATA {
19874    type Message = MavMessage;
19875    const ID: u32 = 46u32;
19876    const NAME: &'static str = "MISSION_ITEM_REACHED";
19877    const EXTRA_CRC: u8 = 11u8;
19878    const ENCODED_LEN: usize = 2usize;
19879    fn deser(
19880        _version: MavlinkVersion,
19881        __input: &[u8],
19882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19883        let avail_len = __input.len();
19884        let mut payload_buf = [0; Self::ENCODED_LEN];
19885        let mut buf = if avail_len < Self::ENCODED_LEN {
19886            payload_buf[0..avail_len].copy_from_slice(__input);
19887            Bytes::new(&payload_buf)
19888        } else {
19889            Bytes::new(__input)
19890        };
19891        let mut __struct = Self::default();
19892        __struct.seq = buf.get_u16_le();
19893        Ok(__struct)
19894    }
19895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19896        let mut __tmp = BytesMut::new(bytes);
19897        #[allow(clippy::absurd_extreme_comparisons)]
19898        #[allow(unused_comparisons)]
19899        if __tmp.remaining() < Self::ENCODED_LEN {
19900            panic!(
19901                "buffer is too small (need {} bytes, but got {})",
19902                Self::ENCODED_LEN,
19903                __tmp.remaining(),
19904            )
19905        }
19906        __tmp.put_u16_le(self.seq);
19907        if matches!(version, MavlinkVersion::V2) {
19908            let len = __tmp.len();
19909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19910        } else {
19911            __tmp.len()
19912        }
19913    }
19914}
19915#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19916#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19917#[doc = ""]
19918#[doc = "ID: 40"]
19919#[derive(Debug, Clone, PartialEq)]
19920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19922#[cfg_attr(feature = "ts", derive(TS))]
19923#[cfg_attr(feature = "ts", ts(export))]
19924pub struct MISSION_REQUEST_DATA {
19925    #[doc = "Sequence"]
19926    pub seq: u16,
19927    #[doc = "System ID"]
19928    pub target_system: u8,
19929    #[doc = "Component ID"]
19930    pub target_component: u8,
19931    #[doc = "Mission type."]
19932    #[cfg_attr(feature = "serde", serde(default))]
19933    pub mission_type: MavMissionType,
19934}
19935impl MISSION_REQUEST_DATA {
19936    pub const ENCODED_LEN: usize = 5usize;
19937    pub const DEFAULT: Self = Self {
19938        seq: 0_u16,
19939        target_system: 0_u8,
19940        target_component: 0_u8,
19941        mission_type: MavMissionType::DEFAULT,
19942    };
19943    #[cfg(feature = "arbitrary")]
19944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19945        use arbitrary::{Arbitrary, Unstructured};
19946        let mut buf = [0u8; 1024];
19947        rng.fill_bytes(&mut buf);
19948        let mut unstructured = Unstructured::new(&buf);
19949        Self::arbitrary(&mut unstructured).unwrap_or_default()
19950    }
19951}
19952impl Default for MISSION_REQUEST_DATA {
19953    fn default() -> Self {
19954        Self::DEFAULT.clone()
19955    }
19956}
19957impl MessageData for MISSION_REQUEST_DATA {
19958    type Message = MavMessage;
19959    const ID: u32 = 40u32;
19960    const NAME: &'static str = "MISSION_REQUEST";
19961    const EXTRA_CRC: u8 = 230u8;
19962    const ENCODED_LEN: usize = 5usize;
19963    fn deser(
19964        _version: MavlinkVersion,
19965        __input: &[u8],
19966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19967        let avail_len = __input.len();
19968        let mut payload_buf = [0; Self::ENCODED_LEN];
19969        let mut buf = if avail_len < Self::ENCODED_LEN {
19970            payload_buf[0..avail_len].copy_from_slice(__input);
19971            Bytes::new(&payload_buf)
19972        } else {
19973            Bytes::new(__input)
19974        };
19975        let mut __struct = Self::default();
19976        __struct.seq = buf.get_u16_le();
19977        __struct.target_system = buf.get_u8();
19978        __struct.target_component = buf.get_u8();
19979        let tmp = buf.get_u8();
19980        __struct.mission_type =
19981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19982                enum_type: "MavMissionType",
19983                value: tmp as u32,
19984            })?;
19985        Ok(__struct)
19986    }
19987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19988        let mut __tmp = BytesMut::new(bytes);
19989        #[allow(clippy::absurd_extreme_comparisons)]
19990        #[allow(unused_comparisons)]
19991        if __tmp.remaining() < Self::ENCODED_LEN {
19992            panic!(
19993                "buffer is too small (need {} bytes, but got {})",
19994                Self::ENCODED_LEN,
19995                __tmp.remaining(),
19996            )
19997        }
19998        __tmp.put_u16_le(self.seq);
19999        __tmp.put_u8(self.target_system);
20000        __tmp.put_u8(self.target_component);
20001        if matches!(version, MavlinkVersion::V2) {
20002            __tmp.put_u8(self.mission_type as u8);
20003            let len = __tmp.len();
20004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20005        } else {
20006            __tmp.len()
20007        }
20008    }
20009}
20010#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20011#[doc = ""]
20012#[doc = "ID: 51"]
20013#[derive(Debug, Clone, PartialEq)]
20014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20016#[cfg_attr(feature = "ts", derive(TS))]
20017#[cfg_attr(feature = "ts", ts(export))]
20018pub struct MISSION_REQUEST_INT_DATA {
20019    #[doc = "Sequence"]
20020    pub seq: u16,
20021    #[doc = "System ID"]
20022    pub target_system: u8,
20023    #[doc = "Component ID"]
20024    pub target_component: u8,
20025    #[doc = "Mission type."]
20026    #[cfg_attr(feature = "serde", serde(default))]
20027    pub mission_type: MavMissionType,
20028}
20029impl MISSION_REQUEST_INT_DATA {
20030    pub const ENCODED_LEN: usize = 5usize;
20031    pub const DEFAULT: Self = Self {
20032        seq: 0_u16,
20033        target_system: 0_u8,
20034        target_component: 0_u8,
20035        mission_type: MavMissionType::DEFAULT,
20036    };
20037    #[cfg(feature = "arbitrary")]
20038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20039        use arbitrary::{Arbitrary, Unstructured};
20040        let mut buf = [0u8; 1024];
20041        rng.fill_bytes(&mut buf);
20042        let mut unstructured = Unstructured::new(&buf);
20043        Self::arbitrary(&mut unstructured).unwrap_or_default()
20044    }
20045}
20046impl Default for MISSION_REQUEST_INT_DATA {
20047    fn default() -> Self {
20048        Self::DEFAULT.clone()
20049    }
20050}
20051impl MessageData for MISSION_REQUEST_INT_DATA {
20052    type Message = MavMessage;
20053    const ID: u32 = 51u32;
20054    const NAME: &'static str = "MISSION_REQUEST_INT";
20055    const EXTRA_CRC: u8 = 196u8;
20056    const ENCODED_LEN: usize = 5usize;
20057    fn deser(
20058        _version: MavlinkVersion,
20059        __input: &[u8],
20060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20061        let avail_len = __input.len();
20062        let mut payload_buf = [0; Self::ENCODED_LEN];
20063        let mut buf = if avail_len < Self::ENCODED_LEN {
20064            payload_buf[0..avail_len].copy_from_slice(__input);
20065            Bytes::new(&payload_buf)
20066        } else {
20067            Bytes::new(__input)
20068        };
20069        let mut __struct = Self::default();
20070        __struct.seq = buf.get_u16_le();
20071        __struct.target_system = buf.get_u8();
20072        __struct.target_component = buf.get_u8();
20073        let tmp = buf.get_u8();
20074        __struct.mission_type =
20075            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20076                enum_type: "MavMissionType",
20077                value: tmp as u32,
20078            })?;
20079        Ok(__struct)
20080    }
20081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20082        let mut __tmp = BytesMut::new(bytes);
20083        #[allow(clippy::absurd_extreme_comparisons)]
20084        #[allow(unused_comparisons)]
20085        if __tmp.remaining() < Self::ENCODED_LEN {
20086            panic!(
20087                "buffer is too small (need {} bytes, but got {})",
20088                Self::ENCODED_LEN,
20089                __tmp.remaining(),
20090            )
20091        }
20092        __tmp.put_u16_le(self.seq);
20093        __tmp.put_u8(self.target_system);
20094        __tmp.put_u8(self.target_component);
20095        if matches!(version, MavlinkVersion::V2) {
20096            __tmp.put_u8(self.mission_type as u8);
20097            let len = __tmp.len();
20098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20099        } else {
20100            __tmp.len()
20101        }
20102    }
20103}
20104#[doc = "Request the overall list of mission items from the system/component."]
20105#[doc = ""]
20106#[doc = "ID: 43"]
20107#[derive(Debug, Clone, PartialEq)]
20108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20110#[cfg_attr(feature = "ts", derive(TS))]
20111#[cfg_attr(feature = "ts", ts(export))]
20112pub struct MISSION_REQUEST_LIST_DATA {
20113    #[doc = "System ID"]
20114    pub target_system: u8,
20115    #[doc = "Component ID"]
20116    pub target_component: u8,
20117    #[doc = "Mission type."]
20118    #[cfg_attr(feature = "serde", serde(default))]
20119    pub mission_type: MavMissionType,
20120}
20121impl MISSION_REQUEST_LIST_DATA {
20122    pub const ENCODED_LEN: usize = 3usize;
20123    pub const DEFAULT: Self = Self {
20124        target_system: 0_u8,
20125        target_component: 0_u8,
20126        mission_type: MavMissionType::DEFAULT,
20127    };
20128    #[cfg(feature = "arbitrary")]
20129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20130        use arbitrary::{Arbitrary, Unstructured};
20131        let mut buf = [0u8; 1024];
20132        rng.fill_bytes(&mut buf);
20133        let mut unstructured = Unstructured::new(&buf);
20134        Self::arbitrary(&mut unstructured).unwrap_or_default()
20135    }
20136}
20137impl Default for MISSION_REQUEST_LIST_DATA {
20138    fn default() -> Self {
20139        Self::DEFAULT.clone()
20140    }
20141}
20142impl MessageData for MISSION_REQUEST_LIST_DATA {
20143    type Message = MavMessage;
20144    const ID: u32 = 43u32;
20145    const NAME: &'static str = "MISSION_REQUEST_LIST";
20146    const EXTRA_CRC: u8 = 132u8;
20147    const ENCODED_LEN: usize = 3usize;
20148    fn deser(
20149        _version: MavlinkVersion,
20150        __input: &[u8],
20151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20152        let avail_len = __input.len();
20153        let mut payload_buf = [0; Self::ENCODED_LEN];
20154        let mut buf = if avail_len < Self::ENCODED_LEN {
20155            payload_buf[0..avail_len].copy_from_slice(__input);
20156            Bytes::new(&payload_buf)
20157        } else {
20158            Bytes::new(__input)
20159        };
20160        let mut __struct = Self::default();
20161        __struct.target_system = buf.get_u8();
20162        __struct.target_component = buf.get_u8();
20163        let tmp = buf.get_u8();
20164        __struct.mission_type =
20165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20166                enum_type: "MavMissionType",
20167                value: tmp as u32,
20168            })?;
20169        Ok(__struct)
20170    }
20171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20172        let mut __tmp = BytesMut::new(bytes);
20173        #[allow(clippy::absurd_extreme_comparisons)]
20174        #[allow(unused_comparisons)]
20175        if __tmp.remaining() < Self::ENCODED_LEN {
20176            panic!(
20177                "buffer is too small (need {} bytes, but got {})",
20178                Self::ENCODED_LEN,
20179                __tmp.remaining(),
20180            )
20181        }
20182        __tmp.put_u8(self.target_system);
20183        __tmp.put_u8(self.target_component);
20184        if matches!(version, MavlinkVersion::V2) {
20185            __tmp.put_u8(self.mission_type as u8);
20186            let len = __tmp.len();
20187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20188        } else {
20189            __tmp.len()
20190        }
20191    }
20192}
20193#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20194#[doc = ""]
20195#[doc = "ID: 37"]
20196#[derive(Debug, Clone, PartialEq)]
20197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20199#[cfg_attr(feature = "ts", derive(TS))]
20200#[cfg_attr(feature = "ts", ts(export))]
20201pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20202    #[doc = "Start index"]
20203    pub start_index: i16,
20204    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20205    pub end_index: i16,
20206    #[doc = "System ID"]
20207    pub target_system: u8,
20208    #[doc = "Component ID"]
20209    pub target_component: u8,
20210    #[doc = "Mission type."]
20211    #[cfg_attr(feature = "serde", serde(default))]
20212    pub mission_type: MavMissionType,
20213}
20214impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20215    pub const ENCODED_LEN: usize = 7usize;
20216    pub const DEFAULT: Self = Self {
20217        start_index: 0_i16,
20218        end_index: 0_i16,
20219        target_system: 0_u8,
20220        target_component: 0_u8,
20221        mission_type: MavMissionType::DEFAULT,
20222    };
20223    #[cfg(feature = "arbitrary")]
20224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20225        use arbitrary::{Arbitrary, Unstructured};
20226        let mut buf = [0u8; 1024];
20227        rng.fill_bytes(&mut buf);
20228        let mut unstructured = Unstructured::new(&buf);
20229        Self::arbitrary(&mut unstructured).unwrap_or_default()
20230    }
20231}
20232impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20233    fn default() -> Self {
20234        Self::DEFAULT.clone()
20235    }
20236}
20237impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20238    type Message = MavMessage;
20239    const ID: u32 = 37u32;
20240    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20241    const EXTRA_CRC: u8 = 212u8;
20242    const ENCODED_LEN: usize = 7usize;
20243    fn deser(
20244        _version: MavlinkVersion,
20245        __input: &[u8],
20246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20247        let avail_len = __input.len();
20248        let mut payload_buf = [0; Self::ENCODED_LEN];
20249        let mut buf = if avail_len < Self::ENCODED_LEN {
20250            payload_buf[0..avail_len].copy_from_slice(__input);
20251            Bytes::new(&payload_buf)
20252        } else {
20253            Bytes::new(__input)
20254        };
20255        let mut __struct = Self::default();
20256        __struct.start_index = buf.get_i16_le();
20257        __struct.end_index = buf.get_i16_le();
20258        __struct.target_system = buf.get_u8();
20259        __struct.target_component = buf.get_u8();
20260        let tmp = buf.get_u8();
20261        __struct.mission_type =
20262            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20263                enum_type: "MavMissionType",
20264                value: tmp as u32,
20265            })?;
20266        Ok(__struct)
20267    }
20268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20269        let mut __tmp = BytesMut::new(bytes);
20270        #[allow(clippy::absurd_extreme_comparisons)]
20271        #[allow(unused_comparisons)]
20272        if __tmp.remaining() < Self::ENCODED_LEN {
20273            panic!(
20274                "buffer is too small (need {} bytes, but got {})",
20275                Self::ENCODED_LEN,
20276                __tmp.remaining(),
20277            )
20278        }
20279        __tmp.put_i16_le(self.start_index);
20280        __tmp.put_i16_le(self.end_index);
20281        __tmp.put_u8(self.target_system);
20282        __tmp.put_u8(self.target_component);
20283        if matches!(version, MavlinkVersion::V2) {
20284            __tmp.put_u8(self.mission_type as u8);
20285            let len = __tmp.len();
20286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20287        } else {
20288            __tmp.len()
20289        }
20290    }
20291}
20292#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20293#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20294#[doc = ""]
20295#[doc = "ID: 41"]
20296#[derive(Debug, Clone, PartialEq)]
20297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20299#[cfg_attr(feature = "ts", derive(TS))]
20300#[cfg_attr(feature = "ts", ts(export))]
20301pub struct MISSION_SET_CURRENT_DATA {
20302    #[doc = "Sequence"]
20303    pub seq: u16,
20304    #[doc = "System ID"]
20305    pub target_system: u8,
20306    #[doc = "Component ID"]
20307    pub target_component: u8,
20308}
20309impl MISSION_SET_CURRENT_DATA {
20310    pub const ENCODED_LEN: usize = 4usize;
20311    pub const DEFAULT: Self = Self {
20312        seq: 0_u16,
20313        target_system: 0_u8,
20314        target_component: 0_u8,
20315    };
20316    #[cfg(feature = "arbitrary")]
20317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20318        use arbitrary::{Arbitrary, Unstructured};
20319        let mut buf = [0u8; 1024];
20320        rng.fill_bytes(&mut buf);
20321        let mut unstructured = Unstructured::new(&buf);
20322        Self::arbitrary(&mut unstructured).unwrap_or_default()
20323    }
20324}
20325impl Default for MISSION_SET_CURRENT_DATA {
20326    fn default() -> Self {
20327        Self::DEFAULT.clone()
20328    }
20329}
20330impl MessageData for MISSION_SET_CURRENT_DATA {
20331    type Message = MavMessage;
20332    const ID: u32 = 41u32;
20333    const NAME: &'static str = "MISSION_SET_CURRENT";
20334    const EXTRA_CRC: u8 = 28u8;
20335    const ENCODED_LEN: usize = 4usize;
20336    fn deser(
20337        _version: MavlinkVersion,
20338        __input: &[u8],
20339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20340        let avail_len = __input.len();
20341        let mut payload_buf = [0; Self::ENCODED_LEN];
20342        let mut buf = if avail_len < Self::ENCODED_LEN {
20343            payload_buf[0..avail_len].copy_from_slice(__input);
20344            Bytes::new(&payload_buf)
20345        } else {
20346            Bytes::new(__input)
20347        };
20348        let mut __struct = Self::default();
20349        __struct.seq = buf.get_u16_le();
20350        __struct.target_system = buf.get_u8();
20351        __struct.target_component = buf.get_u8();
20352        Ok(__struct)
20353    }
20354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20355        let mut __tmp = BytesMut::new(bytes);
20356        #[allow(clippy::absurd_extreme_comparisons)]
20357        #[allow(unused_comparisons)]
20358        if __tmp.remaining() < Self::ENCODED_LEN {
20359            panic!(
20360                "buffer is too small (need {} bytes, but got {})",
20361                Self::ENCODED_LEN,
20362                __tmp.remaining(),
20363            )
20364        }
20365        __tmp.put_u16_le(self.seq);
20366        __tmp.put_u8(self.target_system);
20367        __tmp.put_u8(self.target_component);
20368        if matches!(version, MavlinkVersion::V2) {
20369            let len = __tmp.len();
20370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20371        } else {
20372            __tmp.len()
20373        }
20374    }
20375}
20376#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20377#[doc = ""]
20378#[doc = "ID: 38"]
20379#[derive(Debug, Clone, PartialEq)]
20380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20382#[cfg_attr(feature = "ts", derive(TS))]
20383#[cfg_attr(feature = "ts", ts(export))]
20384pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20385    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20386    pub start_index: i16,
20387    #[doc = "End index, equal or greater than start index."]
20388    pub end_index: i16,
20389    #[doc = "System ID"]
20390    pub target_system: u8,
20391    #[doc = "Component ID"]
20392    pub target_component: u8,
20393    #[doc = "Mission type."]
20394    #[cfg_attr(feature = "serde", serde(default))]
20395    pub mission_type: MavMissionType,
20396}
20397impl MISSION_WRITE_PARTIAL_LIST_DATA {
20398    pub const ENCODED_LEN: usize = 7usize;
20399    pub const DEFAULT: Self = Self {
20400        start_index: 0_i16,
20401        end_index: 0_i16,
20402        target_system: 0_u8,
20403        target_component: 0_u8,
20404        mission_type: MavMissionType::DEFAULT,
20405    };
20406    #[cfg(feature = "arbitrary")]
20407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20408        use arbitrary::{Arbitrary, Unstructured};
20409        let mut buf = [0u8; 1024];
20410        rng.fill_bytes(&mut buf);
20411        let mut unstructured = Unstructured::new(&buf);
20412        Self::arbitrary(&mut unstructured).unwrap_or_default()
20413    }
20414}
20415impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20416    fn default() -> Self {
20417        Self::DEFAULT.clone()
20418    }
20419}
20420impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20421    type Message = MavMessage;
20422    const ID: u32 = 38u32;
20423    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20424    const EXTRA_CRC: u8 = 9u8;
20425    const ENCODED_LEN: usize = 7usize;
20426    fn deser(
20427        _version: MavlinkVersion,
20428        __input: &[u8],
20429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20430        let avail_len = __input.len();
20431        let mut payload_buf = [0; Self::ENCODED_LEN];
20432        let mut buf = if avail_len < Self::ENCODED_LEN {
20433            payload_buf[0..avail_len].copy_from_slice(__input);
20434            Bytes::new(&payload_buf)
20435        } else {
20436            Bytes::new(__input)
20437        };
20438        let mut __struct = Self::default();
20439        __struct.start_index = buf.get_i16_le();
20440        __struct.end_index = buf.get_i16_le();
20441        __struct.target_system = buf.get_u8();
20442        __struct.target_component = buf.get_u8();
20443        let tmp = buf.get_u8();
20444        __struct.mission_type =
20445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20446                enum_type: "MavMissionType",
20447                value: tmp as u32,
20448            })?;
20449        Ok(__struct)
20450    }
20451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20452        let mut __tmp = BytesMut::new(bytes);
20453        #[allow(clippy::absurd_extreme_comparisons)]
20454        #[allow(unused_comparisons)]
20455        if __tmp.remaining() < Self::ENCODED_LEN {
20456            panic!(
20457                "buffer is too small (need {} bytes, but got {})",
20458                Self::ENCODED_LEN,
20459                __tmp.remaining(),
20460            )
20461        }
20462        __tmp.put_i16_le(self.start_index);
20463        __tmp.put_i16_le(self.end_index);
20464        __tmp.put_u8(self.target_system);
20465        __tmp.put_u8(self.target_component);
20466        if matches!(version, MavlinkVersion::V2) {
20467            __tmp.put_u8(self.mission_type as u8);
20468            let len = __tmp.len();
20469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20470        } else {
20471            __tmp.len()
20472        }
20473    }
20474}
20475#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20476#[doc = "Orientation of a mount."]
20477#[doc = ""]
20478#[doc = "ID: 265"]
20479#[derive(Debug, Clone, PartialEq)]
20480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20482#[cfg_attr(feature = "ts", derive(TS))]
20483#[cfg_attr(feature = "ts", ts(export))]
20484pub struct MOUNT_ORIENTATION_DATA {
20485    #[doc = "Timestamp (time since system boot)."]
20486    pub time_boot_ms: u32,
20487    #[doc = "Roll in global frame (set to NaN for invalid)."]
20488    pub roll: f32,
20489    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20490    pub pitch: f32,
20491    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20492    pub yaw: f32,
20493    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20494    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20495    pub yaw_absolute: f32,
20496}
20497impl MOUNT_ORIENTATION_DATA {
20498    pub const ENCODED_LEN: usize = 20usize;
20499    pub const DEFAULT: Self = Self {
20500        time_boot_ms: 0_u32,
20501        roll: 0.0_f32,
20502        pitch: 0.0_f32,
20503        yaw: 0.0_f32,
20504        yaw_absolute: 0.0_f32,
20505    };
20506    #[cfg(feature = "arbitrary")]
20507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20508        use arbitrary::{Arbitrary, Unstructured};
20509        let mut buf = [0u8; 1024];
20510        rng.fill_bytes(&mut buf);
20511        let mut unstructured = Unstructured::new(&buf);
20512        Self::arbitrary(&mut unstructured).unwrap_or_default()
20513    }
20514}
20515impl Default for MOUNT_ORIENTATION_DATA {
20516    fn default() -> Self {
20517        Self::DEFAULT.clone()
20518    }
20519}
20520impl MessageData for MOUNT_ORIENTATION_DATA {
20521    type Message = MavMessage;
20522    const ID: u32 = 265u32;
20523    const NAME: &'static str = "MOUNT_ORIENTATION";
20524    const EXTRA_CRC: u8 = 26u8;
20525    const ENCODED_LEN: usize = 20usize;
20526    fn deser(
20527        _version: MavlinkVersion,
20528        __input: &[u8],
20529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20530        let avail_len = __input.len();
20531        let mut payload_buf = [0; Self::ENCODED_LEN];
20532        let mut buf = if avail_len < Self::ENCODED_LEN {
20533            payload_buf[0..avail_len].copy_from_slice(__input);
20534            Bytes::new(&payload_buf)
20535        } else {
20536            Bytes::new(__input)
20537        };
20538        let mut __struct = Self::default();
20539        __struct.time_boot_ms = buf.get_u32_le();
20540        __struct.roll = buf.get_f32_le();
20541        __struct.pitch = buf.get_f32_le();
20542        __struct.yaw = buf.get_f32_le();
20543        __struct.yaw_absolute = buf.get_f32_le();
20544        Ok(__struct)
20545    }
20546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20547        let mut __tmp = BytesMut::new(bytes);
20548        #[allow(clippy::absurd_extreme_comparisons)]
20549        #[allow(unused_comparisons)]
20550        if __tmp.remaining() < Self::ENCODED_LEN {
20551            panic!(
20552                "buffer is too small (need {} bytes, but got {})",
20553                Self::ENCODED_LEN,
20554                __tmp.remaining(),
20555            )
20556        }
20557        __tmp.put_u32_le(self.time_boot_ms);
20558        __tmp.put_f32_le(self.roll);
20559        __tmp.put_f32_le(self.pitch);
20560        __tmp.put_f32_le(self.yaw);
20561        if matches!(version, MavlinkVersion::V2) {
20562            __tmp.put_f32_le(self.yaw_absolute);
20563            let len = __tmp.len();
20564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20565        } else {
20566            __tmp.len()
20567        }
20568    }
20569}
20570#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20571#[doc = ""]
20572#[doc = "ID: 251"]
20573#[derive(Debug, Clone, PartialEq)]
20574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20576#[cfg_attr(feature = "ts", derive(TS))]
20577#[cfg_attr(feature = "ts", ts(export))]
20578pub struct NAMED_VALUE_FLOAT_DATA {
20579    #[doc = "Timestamp (time since system boot)."]
20580    pub time_boot_ms: u32,
20581    #[doc = "Floating point value"]
20582    pub value: f32,
20583    #[doc = "Name of the debug variable"]
20584    #[cfg_attr(feature = "ts", ts(type = "string"))]
20585    pub name: CharArray<10>,
20586}
20587impl NAMED_VALUE_FLOAT_DATA {
20588    pub const ENCODED_LEN: usize = 18usize;
20589    pub const DEFAULT: Self = Self {
20590        time_boot_ms: 0_u32,
20591        value: 0.0_f32,
20592        name: CharArray::new([0_u8; 10usize]),
20593    };
20594    #[cfg(feature = "arbitrary")]
20595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20596        use arbitrary::{Arbitrary, Unstructured};
20597        let mut buf = [0u8; 1024];
20598        rng.fill_bytes(&mut buf);
20599        let mut unstructured = Unstructured::new(&buf);
20600        Self::arbitrary(&mut unstructured).unwrap_or_default()
20601    }
20602}
20603impl Default for NAMED_VALUE_FLOAT_DATA {
20604    fn default() -> Self {
20605        Self::DEFAULT.clone()
20606    }
20607}
20608impl MessageData for NAMED_VALUE_FLOAT_DATA {
20609    type Message = MavMessage;
20610    const ID: u32 = 251u32;
20611    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20612    const EXTRA_CRC: u8 = 170u8;
20613    const ENCODED_LEN: usize = 18usize;
20614    fn deser(
20615        _version: MavlinkVersion,
20616        __input: &[u8],
20617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20618        let avail_len = __input.len();
20619        let mut payload_buf = [0; Self::ENCODED_LEN];
20620        let mut buf = if avail_len < Self::ENCODED_LEN {
20621            payload_buf[0..avail_len].copy_from_slice(__input);
20622            Bytes::new(&payload_buf)
20623        } else {
20624            Bytes::new(__input)
20625        };
20626        let mut __struct = Self::default();
20627        __struct.time_boot_ms = buf.get_u32_le();
20628        __struct.value = buf.get_f32_le();
20629        let mut tmp = [0_u8; 10usize];
20630        for v in &mut tmp {
20631            *v = buf.get_u8();
20632        }
20633        __struct.name = CharArray::new(tmp);
20634        Ok(__struct)
20635    }
20636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20637        let mut __tmp = BytesMut::new(bytes);
20638        #[allow(clippy::absurd_extreme_comparisons)]
20639        #[allow(unused_comparisons)]
20640        if __tmp.remaining() < Self::ENCODED_LEN {
20641            panic!(
20642                "buffer is too small (need {} bytes, but got {})",
20643                Self::ENCODED_LEN,
20644                __tmp.remaining(),
20645            )
20646        }
20647        __tmp.put_u32_le(self.time_boot_ms);
20648        __tmp.put_f32_le(self.value);
20649        for val in &self.name {
20650            __tmp.put_u8(*val);
20651        }
20652        if matches!(version, MavlinkVersion::V2) {
20653            let len = __tmp.len();
20654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20655        } else {
20656            __tmp.len()
20657        }
20658    }
20659}
20660#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20661#[doc = ""]
20662#[doc = "ID: 252"]
20663#[derive(Debug, Clone, PartialEq)]
20664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20666#[cfg_attr(feature = "ts", derive(TS))]
20667#[cfg_attr(feature = "ts", ts(export))]
20668pub struct NAMED_VALUE_INT_DATA {
20669    #[doc = "Timestamp (time since system boot)."]
20670    pub time_boot_ms: u32,
20671    #[doc = "Signed integer value"]
20672    pub value: i32,
20673    #[doc = "Name of the debug variable"]
20674    #[cfg_attr(feature = "ts", ts(type = "string"))]
20675    pub name: CharArray<10>,
20676}
20677impl NAMED_VALUE_INT_DATA {
20678    pub const ENCODED_LEN: usize = 18usize;
20679    pub const DEFAULT: Self = Self {
20680        time_boot_ms: 0_u32,
20681        value: 0_i32,
20682        name: CharArray::new([0_u8; 10usize]),
20683    };
20684    #[cfg(feature = "arbitrary")]
20685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20686        use arbitrary::{Arbitrary, Unstructured};
20687        let mut buf = [0u8; 1024];
20688        rng.fill_bytes(&mut buf);
20689        let mut unstructured = Unstructured::new(&buf);
20690        Self::arbitrary(&mut unstructured).unwrap_or_default()
20691    }
20692}
20693impl Default for NAMED_VALUE_INT_DATA {
20694    fn default() -> Self {
20695        Self::DEFAULT.clone()
20696    }
20697}
20698impl MessageData for NAMED_VALUE_INT_DATA {
20699    type Message = MavMessage;
20700    const ID: u32 = 252u32;
20701    const NAME: &'static str = "NAMED_VALUE_INT";
20702    const EXTRA_CRC: u8 = 44u8;
20703    const ENCODED_LEN: usize = 18usize;
20704    fn deser(
20705        _version: MavlinkVersion,
20706        __input: &[u8],
20707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20708        let avail_len = __input.len();
20709        let mut payload_buf = [0; Self::ENCODED_LEN];
20710        let mut buf = if avail_len < Self::ENCODED_LEN {
20711            payload_buf[0..avail_len].copy_from_slice(__input);
20712            Bytes::new(&payload_buf)
20713        } else {
20714            Bytes::new(__input)
20715        };
20716        let mut __struct = Self::default();
20717        __struct.time_boot_ms = buf.get_u32_le();
20718        __struct.value = buf.get_i32_le();
20719        let mut tmp = [0_u8; 10usize];
20720        for v in &mut tmp {
20721            *v = buf.get_u8();
20722        }
20723        __struct.name = CharArray::new(tmp);
20724        Ok(__struct)
20725    }
20726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20727        let mut __tmp = BytesMut::new(bytes);
20728        #[allow(clippy::absurd_extreme_comparisons)]
20729        #[allow(unused_comparisons)]
20730        if __tmp.remaining() < Self::ENCODED_LEN {
20731            panic!(
20732                "buffer is too small (need {} bytes, but got {})",
20733                Self::ENCODED_LEN,
20734                __tmp.remaining(),
20735            )
20736        }
20737        __tmp.put_u32_le(self.time_boot_ms);
20738        __tmp.put_i32_le(self.value);
20739        for val in &self.name {
20740            __tmp.put_u8(*val);
20741        }
20742        if matches!(version, MavlinkVersion::V2) {
20743            let len = __tmp.len();
20744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20745        } else {
20746            __tmp.len()
20747        }
20748    }
20749}
20750#[doc = "The state of the navigation and position controller."]
20751#[doc = ""]
20752#[doc = "ID: 62"]
20753#[derive(Debug, Clone, PartialEq)]
20754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20756#[cfg_attr(feature = "ts", derive(TS))]
20757#[cfg_attr(feature = "ts", ts(export))]
20758pub struct NAV_CONTROLLER_OUTPUT_DATA {
20759    #[doc = "Current desired roll"]
20760    pub nav_roll: f32,
20761    #[doc = "Current desired pitch"]
20762    pub nav_pitch: f32,
20763    #[doc = "Current altitude error"]
20764    pub alt_error: f32,
20765    #[doc = "Current airspeed error"]
20766    pub aspd_error: f32,
20767    #[doc = "Current crosstrack error on x-y plane"]
20768    pub xtrack_error: f32,
20769    #[doc = "Current desired heading"]
20770    pub nav_bearing: i16,
20771    #[doc = "Bearing to current waypoint/target"]
20772    pub target_bearing: i16,
20773    #[doc = "Distance to active waypoint"]
20774    pub wp_dist: u16,
20775}
20776impl NAV_CONTROLLER_OUTPUT_DATA {
20777    pub const ENCODED_LEN: usize = 26usize;
20778    pub const DEFAULT: Self = Self {
20779        nav_roll: 0.0_f32,
20780        nav_pitch: 0.0_f32,
20781        alt_error: 0.0_f32,
20782        aspd_error: 0.0_f32,
20783        xtrack_error: 0.0_f32,
20784        nav_bearing: 0_i16,
20785        target_bearing: 0_i16,
20786        wp_dist: 0_u16,
20787    };
20788    #[cfg(feature = "arbitrary")]
20789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20790        use arbitrary::{Arbitrary, Unstructured};
20791        let mut buf = [0u8; 1024];
20792        rng.fill_bytes(&mut buf);
20793        let mut unstructured = Unstructured::new(&buf);
20794        Self::arbitrary(&mut unstructured).unwrap_or_default()
20795    }
20796}
20797impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20798    fn default() -> Self {
20799        Self::DEFAULT.clone()
20800    }
20801}
20802impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20803    type Message = MavMessage;
20804    const ID: u32 = 62u32;
20805    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20806    const EXTRA_CRC: u8 = 183u8;
20807    const ENCODED_LEN: usize = 26usize;
20808    fn deser(
20809        _version: MavlinkVersion,
20810        __input: &[u8],
20811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20812        let avail_len = __input.len();
20813        let mut payload_buf = [0; Self::ENCODED_LEN];
20814        let mut buf = if avail_len < Self::ENCODED_LEN {
20815            payload_buf[0..avail_len].copy_from_slice(__input);
20816            Bytes::new(&payload_buf)
20817        } else {
20818            Bytes::new(__input)
20819        };
20820        let mut __struct = Self::default();
20821        __struct.nav_roll = buf.get_f32_le();
20822        __struct.nav_pitch = buf.get_f32_le();
20823        __struct.alt_error = buf.get_f32_le();
20824        __struct.aspd_error = buf.get_f32_le();
20825        __struct.xtrack_error = buf.get_f32_le();
20826        __struct.nav_bearing = buf.get_i16_le();
20827        __struct.target_bearing = buf.get_i16_le();
20828        __struct.wp_dist = buf.get_u16_le();
20829        Ok(__struct)
20830    }
20831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20832        let mut __tmp = BytesMut::new(bytes);
20833        #[allow(clippy::absurd_extreme_comparisons)]
20834        #[allow(unused_comparisons)]
20835        if __tmp.remaining() < Self::ENCODED_LEN {
20836            panic!(
20837                "buffer is too small (need {} bytes, but got {})",
20838                Self::ENCODED_LEN,
20839                __tmp.remaining(),
20840            )
20841        }
20842        __tmp.put_f32_le(self.nav_roll);
20843        __tmp.put_f32_le(self.nav_pitch);
20844        __tmp.put_f32_le(self.alt_error);
20845        __tmp.put_f32_le(self.aspd_error);
20846        __tmp.put_f32_le(self.xtrack_error);
20847        __tmp.put_i16_le(self.nav_bearing);
20848        __tmp.put_i16_le(self.target_bearing);
20849        __tmp.put_u16_le(self.wp_dist);
20850        if matches!(version, MavlinkVersion::V2) {
20851            let len = __tmp.len();
20852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20853        } else {
20854            __tmp.len()
20855        }
20856    }
20857}
20858#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20859#[doc = ""]
20860#[doc = "ID: 330"]
20861#[derive(Debug, Clone, PartialEq)]
20862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20864#[cfg_attr(feature = "ts", derive(TS))]
20865#[cfg_attr(feature = "ts", ts(export))]
20866pub struct OBSTACLE_DISTANCE_DATA {
20867    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20868    pub time_usec: u64,
20869    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20872    pub distances: [u16; 72],
20873    #[doc = "Minimum distance the sensor can measure."]
20874    pub min_distance: u16,
20875    #[doc = "Maximum distance the sensor can measure."]
20876    pub max_distance: u16,
20877    #[doc = "Class id of the distance sensor type."]
20878    pub sensor_type: MavDistanceSensor,
20879    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20880    pub increment: u8,
20881    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20883    pub increment_f: f32,
20884    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20885    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20886    pub angle_offset: f32,
20887    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20888    #[cfg_attr(feature = "serde", serde(default))]
20889    pub frame: MavFrame,
20890}
20891impl OBSTACLE_DISTANCE_DATA {
20892    pub const ENCODED_LEN: usize = 167usize;
20893    pub const DEFAULT: Self = Self {
20894        time_usec: 0_u64,
20895        distances: [0_u16; 72usize],
20896        min_distance: 0_u16,
20897        max_distance: 0_u16,
20898        sensor_type: MavDistanceSensor::DEFAULT,
20899        increment: 0_u8,
20900        increment_f: 0.0_f32,
20901        angle_offset: 0.0_f32,
20902        frame: MavFrame::DEFAULT,
20903    };
20904    #[cfg(feature = "arbitrary")]
20905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20906        use arbitrary::{Arbitrary, Unstructured};
20907        let mut buf = [0u8; 1024];
20908        rng.fill_bytes(&mut buf);
20909        let mut unstructured = Unstructured::new(&buf);
20910        Self::arbitrary(&mut unstructured).unwrap_or_default()
20911    }
20912}
20913impl Default for OBSTACLE_DISTANCE_DATA {
20914    fn default() -> Self {
20915        Self::DEFAULT.clone()
20916    }
20917}
20918impl MessageData for OBSTACLE_DISTANCE_DATA {
20919    type Message = MavMessage;
20920    const ID: u32 = 330u32;
20921    const NAME: &'static str = "OBSTACLE_DISTANCE";
20922    const EXTRA_CRC: u8 = 23u8;
20923    const ENCODED_LEN: usize = 167usize;
20924    fn deser(
20925        _version: MavlinkVersion,
20926        __input: &[u8],
20927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20928        let avail_len = __input.len();
20929        let mut payload_buf = [0; Self::ENCODED_LEN];
20930        let mut buf = if avail_len < Self::ENCODED_LEN {
20931            payload_buf[0..avail_len].copy_from_slice(__input);
20932            Bytes::new(&payload_buf)
20933        } else {
20934            Bytes::new(__input)
20935        };
20936        let mut __struct = Self::default();
20937        __struct.time_usec = buf.get_u64_le();
20938        for v in &mut __struct.distances {
20939            let val = buf.get_u16_le();
20940            *v = val;
20941        }
20942        __struct.min_distance = buf.get_u16_le();
20943        __struct.max_distance = buf.get_u16_le();
20944        let tmp = buf.get_u8();
20945        __struct.sensor_type =
20946            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20947                enum_type: "MavDistanceSensor",
20948                value: tmp as u32,
20949            })?;
20950        __struct.increment = buf.get_u8();
20951        __struct.increment_f = buf.get_f32_le();
20952        __struct.angle_offset = buf.get_f32_le();
20953        let tmp = buf.get_u8();
20954        __struct.frame =
20955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20956                enum_type: "MavFrame",
20957                value: tmp as u32,
20958            })?;
20959        Ok(__struct)
20960    }
20961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20962        let mut __tmp = BytesMut::new(bytes);
20963        #[allow(clippy::absurd_extreme_comparisons)]
20964        #[allow(unused_comparisons)]
20965        if __tmp.remaining() < Self::ENCODED_LEN {
20966            panic!(
20967                "buffer is too small (need {} bytes, but got {})",
20968                Self::ENCODED_LEN,
20969                __tmp.remaining(),
20970            )
20971        }
20972        __tmp.put_u64_le(self.time_usec);
20973        for val in &self.distances {
20974            __tmp.put_u16_le(*val);
20975        }
20976        __tmp.put_u16_le(self.min_distance);
20977        __tmp.put_u16_le(self.max_distance);
20978        __tmp.put_u8(self.sensor_type as u8);
20979        __tmp.put_u8(self.increment);
20980        if matches!(version, MavlinkVersion::V2) {
20981            __tmp.put_f32_le(self.increment_f);
20982            __tmp.put_f32_le(self.angle_offset);
20983            __tmp.put_u8(self.frame as u8);
20984            let len = __tmp.len();
20985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20986        } else {
20987            __tmp.len()
20988        }
20989    }
20990}
20991#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20992#[doc = ""]
20993#[doc = "ID: 331"]
20994#[derive(Debug, Clone, PartialEq)]
20995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20997#[cfg_attr(feature = "ts", derive(TS))]
20998#[cfg_attr(feature = "ts", ts(export))]
20999pub struct ODOMETRY_DATA {
21000    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21001    pub time_usec: u64,
21002    #[doc = "X Position"]
21003    pub x: f32,
21004    #[doc = "Y Position"]
21005    pub y: f32,
21006    #[doc = "Z Position"]
21007    pub z: f32,
21008    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21009    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21010    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21011    pub q: [f32; 4],
21012    #[doc = "X linear speed"]
21013    pub vx: f32,
21014    #[doc = "Y linear speed"]
21015    pub vy: f32,
21016    #[doc = "Z linear speed"]
21017    pub vz: f32,
21018    #[doc = "Roll angular speed"]
21019    pub rollspeed: f32,
21020    #[doc = "Pitch angular speed"]
21021    pub pitchspeed: f32,
21022    #[doc = "Yaw angular speed"]
21023    pub yawspeed: f32,
21024    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21025    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21026    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21027    pub pose_covariance: [f32; 21],
21028    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21030    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21031    pub velocity_covariance: [f32; 21],
21032    #[doc = "Coordinate frame of reference for the pose data."]
21033    pub frame_id: MavFrame,
21034    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21035    pub child_frame_id: MavFrame,
21036    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21037    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21038    pub reset_counter: u8,
21039    #[doc = "Type of estimator that is providing the odometry."]
21040    #[cfg_attr(feature = "serde", serde(default))]
21041    pub estimator_type: MavEstimatorType,
21042    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21043    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21044    pub quality: i8,
21045}
21046impl ODOMETRY_DATA {
21047    pub const ENCODED_LEN: usize = 233usize;
21048    pub const DEFAULT: Self = Self {
21049        time_usec: 0_u64,
21050        x: 0.0_f32,
21051        y: 0.0_f32,
21052        z: 0.0_f32,
21053        q: [0.0_f32; 4usize],
21054        vx: 0.0_f32,
21055        vy: 0.0_f32,
21056        vz: 0.0_f32,
21057        rollspeed: 0.0_f32,
21058        pitchspeed: 0.0_f32,
21059        yawspeed: 0.0_f32,
21060        pose_covariance: [0.0_f32; 21usize],
21061        velocity_covariance: [0.0_f32; 21usize],
21062        frame_id: MavFrame::DEFAULT,
21063        child_frame_id: MavFrame::DEFAULT,
21064        reset_counter: 0_u8,
21065        estimator_type: MavEstimatorType::DEFAULT,
21066        quality: 0_i8,
21067    };
21068    #[cfg(feature = "arbitrary")]
21069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21070        use arbitrary::{Arbitrary, Unstructured};
21071        let mut buf = [0u8; 1024];
21072        rng.fill_bytes(&mut buf);
21073        let mut unstructured = Unstructured::new(&buf);
21074        Self::arbitrary(&mut unstructured).unwrap_or_default()
21075    }
21076}
21077impl Default for ODOMETRY_DATA {
21078    fn default() -> Self {
21079        Self::DEFAULT.clone()
21080    }
21081}
21082impl MessageData for ODOMETRY_DATA {
21083    type Message = MavMessage;
21084    const ID: u32 = 331u32;
21085    const NAME: &'static str = "ODOMETRY";
21086    const EXTRA_CRC: u8 = 91u8;
21087    const ENCODED_LEN: usize = 233usize;
21088    fn deser(
21089        _version: MavlinkVersion,
21090        __input: &[u8],
21091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21092        let avail_len = __input.len();
21093        let mut payload_buf = [0; Self::ENCODED_LEN];
21094        let mut buf = if avail_len < Self::ENCODED_LEN {
21095            payload_buf[0..avail_len].copy_from_slice(__input);
21096            Bytes::new(&payload_buf)
21097        } else {
21098            Bytes::new(__input)
21099        };
21100        let mut __struct = Self::default();
21101        __struct.time_usec = buf.get_u64_le();
21102        __struct.x = buf.get_f32_le();
21103        __struct.y = buf.get_f32_le();
21104        __struct.z = buf.get_f32_le();
21105        for v in &mut __struct.q {
21106            let val = buf.get_f32_le();
21107            *v = val;
21108        }
21109        __struct.vx = buf.get_f32_le();
21110        __struct.vy = buf.get_f32_le();
21111        __struct.vz = buf.get_f32_le();
21112        __struct.rollspeed = buf.get_f32_le();
21113        __struct.pitchspeed = buf.get_f32_le();
21114        __struct.yawspeed = buf.get_f32_le();
21115        for v in &mut __struct.pose_covariance {
21116            let val = buf.get_f32_le();
21117            *v = val;
21118        }
21119        for v in &mut __struct.velocity_covariance {
21120            let val = buf.get_f32_le();
21121            *v = val;
21122        }
21123        let tmp = buf.get_u8();
21124        __struct.frame_id =
21125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21126                enum_type: "MavFrame",
21127                value: tmp as u32,
21128            })?;
21129        let tmp = buf.get_u8();
21130        __struct.child_frame_id =
21131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21132                enum_type: "MavFrame",
21133                value: tmp as u32,
21134            })?;
21135        __struct.reset_counter = buf.get_u8();
21136        let tmp = buf.get_u8();
21137        __struct.estimator_type =
21138            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21139                enum_type: "MavEstimatorType",
21140                value: tmp as u32,
21141            })?;
21142        __struct.quality = buf.get_i8();
21143        Ok(__struct)
21144    }
21145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21146        let mut __tmp = BytesMut::new(bytes);
21147        #[allow(clippy::absurd_extreme_comparisons)]
21148        #[allow(unused_comparisons)]
21149        if __tmp.remaining() < Self::ENCODED_LEN {
21150            panic!(
21151                "buffer is too small (need {} bytes, but got {})",
21152                Self::ENCODED_LEN,
21153                __tmp.remaining(),
21154            )
21155        }
21156        __tmp.put_u64_le(self.time_usec);
21157        __tmp.put_f32_le(self.x);
21158        __tmp.put_f32_le(self.y);
21159        __tmp.put_f32_le(self.z);
21160        for val in &self.q {
21161            __tmp.put_f32_le(*val);
21162        }
21163        __tmp.put_f32_le(self.vx);
21164        __tmp.put_f32_le(self.vy);
21165        __tmp.put_f32_le(self.vz);
21166        __tmp.put_f32_le(self.rollspeed);
21167        __tmp.put_f32_le(self.pitchspeed);
21168        __tmp.put_f32_le(self.yawspeed);
21169        for val in &self.pose_covariance {
21170            __tmp.put_f32_le(*val);
21171        }
21172        for val in &self.velocity_covariance {
21173            __tmp.put_f32_le(*val);
21174        }
21175        __tmp.put_u8(self.frame_id as u8);
21176        __tmp.put_u8(self.child_frame_id as u8);
21177        if matches!(version, MavlinkVersion::V2) {
21178            __tmp.put_u8(self.reset_counter);
21179            __tmp.put_u8(self.estimator_type as u8);
21180            __tmp.put_i8(self.quality);
21181            let len = __tmp.len();
21182            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21183        } else {
21184            __tmp.len()
21185        }
21186    }
21187}
21188#[doc = "Hardware status sent by an onboard computer."]
21189#[doc = ""]
21190#[doc = "ID: 390"]
21191#[derive(Debug, Clone, PartialEq)]
21192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21194#[cfg_attr(feature = "ts", derive(TS))]
21195#[cfg_attr(feature = "ts", ts(export))]
21196pub struct ONBOARD_COMPUTER_STATUS_DATA {
21197    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21198    pub time_usec: u64,
21199    #[doc = "Time since system boot."]
21200    pub uptime: u32,
21201    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21202    pub ram_usage: u32,
21203    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21204    pub ram_total: u32,
21205    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21206    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21207    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21208    pub storage_type: [u32; 4],
21209    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21211    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21212    pub storage_usage: [u32; 4],
21213    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21216    pub storage_total: [u32; 4],
21217    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21219    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21220    pub link_type: [u32; 6],
21221    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21223    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21224    pub link_tx_rate: [u32; 6],
21225    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21226    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21227    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21228    pub link_rx_rate: [u32; 6],
21229    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21231    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21232    pub link_tx_max: [u32; 6],
21233    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21235    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21236    pub link_rx_max: [u32; 6],
21237    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21240    pub fan_speed: [i16; 4],
21241    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21242    pub mavtype: u8,
21243    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21246    pub cpu_cores: [u8; 8],
21247    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21249    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21250    pub cpu_combined: [u8; 10],
21251    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21253    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21254    pub gpu_cores: [u8; 4],
21255    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21257    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21258    pub gpu_combined: [u8; 10],
21259    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21260    pub temperature_board: i8,
21261    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21263    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21264    pub temperature_core: [i8; 8],
21265}
21266impl ONBOARD_COMPUTER_STATUS_DATA {
21267    pub const ENCODED_LEN: usize = 238usize;
21268    pub const DEFAULT: Self = Self {
21269        time_usec: 0_u64,
21270        uptime: 0_u32,
21271        ram_usage: 0_u32,
21272        ram_total: 0_u32,
21273        storage_type: [0_u32; 4usize],
21274        storage_usage: [0_u32; 4usize],
21275        storage_total: [0_u32; 4usize],
21276        link_type: [0_u32; 6usize],
21277        link_tx_rate: [0_u32; 6usize],
21278        link_rx_rate: [0_u32; 6usize],
21279        link_tx_max: [0_u32; 6usize],
21280        link_rx_max: [0_u32; 6usize],
21281        fan_speed: [0_i16; 4usize],
21282        mavtype: 0_u8,
21283        cpu_cores: [0_u8; 8usize],
21284        cpu_combined: [0_u8; 10usize],
21285        gpu_cores: [0_u8; 4usize],
21286        gpu_combined: [0_u8; 10usize],
21287        temperature_board: 0_i8,
21288        temperature_core: [0_i8; 8usize],
21289    };
21290    #[cfg(feature = "arbitrary")]
21291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21292        use arbitrary::{Arbitrary, Unstructured};
21293        let mut buf = [0u8; 1024];
21294        rng.fill_bytes(&mut buf);
21295        let mut unstructured = Unstructured::new(&buf);
21296        Self::arbitrary(&mut unstructured).unwrap_or_default()
21297    }
21298}
21299impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21300    fn default() -> Self {
21301        Self::DEFAULT.clone()
21302    }
21303}
21304impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21305    type Message = MavMessage;
21306    const ID: u32 = 390u32;
21307    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21308    const EXTRA_CRC: u8 = 156u8;
21309    const ENCODED_LEN: usize = 238usize;
21310    fn deser(
21311        _version: MavlinkVersion,
21312        __input: &[u8],
21313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21314        let avail_len = __input.len();
21315        let mut payload_buf = [0; Self::ENCODED_LEN];
21316        let mut buf = if avail_len < Self::ENCODED_LEN {
21317            payload_buf[0..avail_len].copy_from_slice(__input);
21318            Bytes::new(&payload_buf)
21319        } else {
21320            Bytes::new(__input)
21321        };
21322        let mut __struct = Self::default();
21323        __struct.time_usec = buf.get_u64_le();
21324        __struct.uptime = buf.get_u32_le();
21325        __struct.ram_usage = buf.get_u32_le();
21326        __struct.ram_total = buf.get_u32_le();
21327        for v in &mut __struct.storage_type {
21328            let val = buf.get_u32_le();
21329            *v = val;
21330        }
21331        for v in &mut __struct.storage_usage {
21332            let val = buf.get_u32_le();
21333            *v = val;
21334        }
21335        for v in &mut __struct.storage_total {
21336            let val = buf.get_u32_le();
21337            *v = val;
21338        }
21339        for v in &mut __struct.link_type {
21340            let val = buf.get_u32_le();
21341            *v = val;
21342        }
21343        for v in &mut __struct.link_tx_rate {
21344            let val = buf.get_u32_le();
21345            *v = val;
21346        }
21347        for v in &mut __struct.link_rx_rate {
21348            let val = buf.get_u32_le();
21349            *v = val;
21350        }
21351        for v in &mut __struct.link_tx_max {
21352            let val = buf.get_u32_le();
21353            *v = val;
21354        }
21355        for v in &mut __struct.link_rx_max {
21356            let val = buf.get_u32_le();
21357            *v = val;
21358        }
21359        for v in &mut __struct.fan_speed {
21360            let val = buf.get_i16_le();
21361            *v = val;
21362        }
21363        __struct.mavtype = buf.get_u8();
21364        for v in &mut __struct.cpu_cores {
21365            let val = buf.get_u8();
21366            *v = val;
21367        }
21368        for v in &mut __struct.cpu_combined {
21369            let val = buf.get_u8();
21370            *v = val;
21371        }
21372        for v in &mut __struct.gpu_cores {
21373            let val = buf.get_u8();
21374            *v = val;
21375        }
21376        for v in &mut __struct.gpu_combined {
21377            let val = buf.get_u8();
21378            *v = val;
21379        }
21380        __struct.temperature_board = buf.get_i8();
21381        for v in &mut __struct.temperature_core {
21382            let val = buf.get_i8();
21383            *v = val;
21384        }
21385        Ok(__struct)
21386    }
21387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21388        let mut __tmp = BytesMut::new(bytes);
21389        #[allow(clippy::absurd_extreme_comparisons)]
21390        #[allow(unused_comparisons)]
21391        if __tmp.remaining() < Self::ENCODED_LEN {
21392            panic!(
21393                "buffer is too small (need {} bytes, but got {})",
21394                Self::ENCODED_LEN,
21395                __tmp.remaining(),
21396            )
21397        }
21398        __tmp.put_u64_le(self.time_usec);
21399        __tmp.put_u32_le(self.uptime);
21400        __tmp.put_u32_le(self.ram_usage);
21401        __tmp.put_u32_le(self.ram_total);
21402        for val in &self.storage_type {
21403            __tmp.put_u32_le(*val);
21404        }
21405        for val in &self.storage_usage {
21406            __tmp.put_u32_le(*val);
21407        }
21408        for val in &self.storage_total {
21409            __tmp.put_u32_le(*val);
21410        }
21411        for val in &self.link_type {
21412            __tmp.put_u32_le(*val);
21413        }
21414        for val in &self.link_tx_rate {
21415            __tmp.put_u32_le(*val);
21416        }
21417        for val in &self.link_rx_rate {
21418            __tmp.put_u32_le(*val);
21419        }
21420        for val in &self.link_tx_max {
21421            __tmp.put_u32_le(*val);
21422        }
21423        for val in &self.link_rx_max {
21424            __tmp.put_u32_le(*val);
21425        }
21426        for val in &self.fan_speed {
21427            __tmp.put_i16_le(*val);
21428        }
21429        __tmp.put_u8(self.mavtype);
21430        for val in &self.cpu_cores {
21431            __tmp.put_u8(*val);
21432        }
21433        for val in &self.cpu_combined {
21434            __tmp.put_u8(*val);
21435        }
21436        for val in &self.gpu_cores {
21437            __tmp.put_u8(*val);
21438        }
21439        for val in &self.gpu_combined {
21440            __tmp.put_u8(*val);
21441        }
21442        __tmp.put_i8(self.temperature_board);
21443        for val in &self.temperature_core {
21444            __tmp.put_i8(*val);
21445        }
21446        if matches!(version, MavlinkVersion::V2) {
21447            let len = __tmp.len();
21448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21449        } else {
21450            __tmp.len()
21451        }
21452    }
21453}
21454#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21455#[doc = ""]
21456#[doc = "ID: 12918"]
21457#[derive(Debug, Clone, PartialEq)]
21458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21460#[cfg_attr(feature = "ts", derive(TS))]
21461#[cfg_attr(feature = "ts", ts(export))]
21462pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21463    #[doc = "Status level indicating if arming is allowed."]
21464    pub status: MavOdidArmStatus,
21465    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21466    #[cfg_attr(feature = "ts", ts(type = "string"))]
21467    pub error: CharArray<50>,
21468}
21469impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21470    pub const ENCODED_LEN: usize = 51usize;
21471    pub const DEFAULT: Self = Self {
21472        status: MavOdidArmStatus::DEFAULT,
21473        error: CharArray::new([0_u8; 50usize]),
21474    };
21475    #[cfg(feature = "arbitrary")]
21476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21477        use arbitrary::{Arbitrary, Unstructured};
21478        let mut buf = [0u8; 1024];
21479        rng.fill_bytes(&mut buf);
21480        let mut unstructured = Unstructured::new(&buf);
21481        Self::arbitrary(&mut unstructured).unwrap_or_default()
21482    }
21483}
21484impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21485    fn default() -> Self {
21486        Self::DEFAULT.clone()
21487    }
21488}
21489impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21490    type Message = MavMessage;
21491    const ID: u32 = 12918u32;
21492    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21493    const EXTRA_CRC: u8 = 139u8;
21494    const ENCODED_LEN: usize = 51usize;
21495    fn deser(
21496        _version: MavlinkVersion,
21497        __input: &[u8],
21498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21499        let avail_len = __input.len();
21500        let mut payload_buf = [0; Self::ENCODED_LEN];
21501        let mut buf = if avail_len < Self::ENCODED_LEN {
21502            payload_buf[0..avail_len].copy_from_slice(__input);
21503            Bytes::new(&payload_buf)
21504        } else {
21505            Bytes::new(__input)
21506        };
21507        let mut __struct = Self::default();
21508        let tmp = buf.get_u8();
21509        __struct.status =
21510            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21511                enum_type: "MavOdidArmStatus",
21512                value: tmp as u32,
21513            })?;
21514        let mut tmp = [0_u8; 50usize];
21515        for v in &mut tmp {
21516            *v = buf.get_u8();
21517        }
21518        __struct.error = CharArray::new(tmp);
21519        Ok(__struct)
21520    }
21521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21522        let mut __tmp = BytesMut::new(bytes);
21523        #[allow(clippy::absurd_extreme_comparisons)]
21524        #[allow(unused_comparisons)]
21525        if __tmp.remaining() < Self::ENCODED_LEN {
21526            panic!(
21527                "buffer is too small (need {} bytes, but got {})",
21528                Self::ENCODED_LEN,
21529                __tmp.remaining(),
21530            )
21531        }
21532        __tmp.put_u8(self.status as u8);
21533        for val in &self.error {
21534            __tmp.put_u8(*val);
21535        }
21536        if matches!(version, MavlinkVersion::V2) {
21537            let len = __tmp.len();
21538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21539        } else {
21540            __tmp.len()
21541        }
21542    }
21543}
21544#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21545#[doc = ""]
21546#[doc = "ID: 12902"]
21547#[derive(Debug, Clone, PartialEq)]
21548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21550#[cfg_attr(feature = "ts", derive(TS))]
21551#[cfg_attr(feature = "ts", ts(export))]
21552pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21553    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21554    pub timestamp: u32,
21555    #[doc = "System ID (0 for broadcast)."]
21556    pub target_system: u8,
21557    #[doc = "Component ID (0 for broadcast)."]
21558    pub target_component: u8,
21559    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21562    pub id_or_mac: [u8; 20],
21563    #[doc = "Indicates the type of authentication."]
21564    pub authentication_type: MavOdidAuthType,
21565    #[doc = "Allowed range is 0 - 15."]
21566    pub data_page: u8,
21567    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21568    pub last_page_index: u8,
21569    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21570    pub length: u8,
21571    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21572    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21573    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21574    pub authentication_data: [u8; 23],
21575}
21576impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21577    pub const ENCODED_LEN: usize = 53usize;
21578    pub const DEFAULT: Self = Self {
21579        timestamp: 0_u32,
21580        target_system: 0_u8,
21581        target_component: 0_u8,
21582        id_or_mac: [0_u8; 20usize],
21583        authentication_type: MavOdidAuthType::DEFAULT,
21584        data_page: 0_u8,
21585        last_page_index: 0_u8,
21586        length: 0_u8,
21587        authentication_data: [0_u8; 23usize],
21588    };
21589    #[cfg(feature = "arbitrary")]
21590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21591        use arbitrary::{Arbitrary, Unstructured};
21592        let mut buf = [0u8; 1024];
21593        rng.fill_bytes(&mut buf);
21594        let mut unstructured = Unstructured::new(&buf);
21595        Self::arbitrary(&mut unstructured).unwrap_or_default()
21596    }
21597}
21598impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21599    fn default() -> Self {
21600        Self::DEFAULT.clone()
21601    }
21602}
21603impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21604    type Message = MavMessage;
21605    const ID: u32 = 12902u32;
21606    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21607    const EXTRA_CRC: u8 = 140u8;
21608    const ENCODED_LEN: usize = 53usize;
21609    fn deser(
21610        _version: MavlinkVersion,
21611        __input: &[u8],
21612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21613        let avail_len = __input.len();
21614        let mut payload_buf = [0; Self::ENCODED_LEN];
21615        let mut buf = if avail_len < Self::ENCODED_LEN {
21616            payload_buf[0..avail_len].copy_from_slice(__input);
21617            Bytes::new(&payload_buf)
21618        } else {
21619            Bytes::new(__input)
21620        };
21621        let mut __struct = Self::default();
21622        __struct.timestamp = buf.get_u32_le();
21623        __struct.target_system = buf.get_u8();
21624        __struct.target_component = buf.get_u8();
21625        for v in &mut __struct.id_or_mac {
21626            let val = buf.get_u8();
21627            *v = val;
21628        }
21629        let tmp = buf.get_u8();
21630        __struct.authentication_type =
21631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21632                enum_type: "MavOdidAuthType",
21633                value: tmp as u32,
21634            })?;
21635        __struct.data_page = buf.get_u8();
21636        __struct.last_page_index = buf.get_u8();
21637        __struct.length = buf.get_u8();
21638        for v in &mut __struct.authentication_data {
21639            let val = buf.get_u8();
21640            *v = val;
21641        }
21642        Ok(__struct)
21643    }
21644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21645        let mut __tmp = BytesMut::new(bytes);
21646        #[allow(clippy::absurd_extreme_comparisons)]
21647        #[allow(unused_comparisons)]
21648        if __tmp.remaining() < Self::ENCODED_LEN {
21649            panic!(
21650                "buffer is too small (need {} bytes, but got {})",
21651                Self::ENCODED_LEN,
21652                __tmp.remaining(),
21653            )
21654        }
21655        __tmp.put_u32_le(self.timestamp);
21656        __tmp.put_u8(self.target_system);
21657        __tmp.put_u8(self.target_component);
21658        for val in &self.id_or_mac {
21659            __tmp.put_u8(*val);
21660        }
21661        __tmp.put_u8(self.authentication_type as u8);
21662        __tmp.put_u8(self.data_page);
21663        __tmp.put_u8(self.last_page_index);
21664        __tmp.put_u8(self.length);
21665        for val in &self.authentication_data {
21666            __tmp.put_u8(*val);
21667        }
21668        if matches!(version, MavlinkVersion::V2) {
21669            let len = __tmp.len();
21670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21671        } else {
21672            __tmp.len()
21673        }
21674    }
21675}
21676#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21677#[doc = ""]
21678#[doc = "ID: 12900"]
21679#[derive(Debug, Clone, PartialEq)]
21680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21682#[cfg_attr(feature = "ts", derive(TS))]
21683#[cfg_attr(feature = "ts", ts(export))]
21684pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21685    #[doc = "System ID (0 for broadcast)."]
21686    pub target_system: u8,
21687    #[doc = "Component ID (0 for broadcast)."]
21688    pub target_component: u8,
21689    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21692    pub id_or_mac: [u8; 20],
21693    #[doc = "Indicates the format for the uas_id field of this message."]
21694    pub id_type: MavOdidIdType,
21695    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21696    pub ua_type: MavOdidUaType,
21697    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21698    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21699    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21700    pub uas_id: [u8; 20],
21701}
21702impl OPEN_DRONE_ID_BASIC_ID_DATA {
21703    pub const ENCODED_LEN: usize = 44usize;
21704    pub const DEFAULT: Self = Self {
21705        target_system: 0_u8,
21706        target_component: 0_u8,
21707        id_or_mac: [0_u8; 20usize],
21708        id_type: MavOdidIdType::DEFAULT,
21709        ua_type: MavOdidUaType::DEFAULT,
21710        uas_id: [0_u8; 20usize],
21711    };
21712    #[cfg(feature = "arbitrary")]
21713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21714        use arbitrary::{Arbitrary, Unstructured};
21715        let mut buf = [0u8; 1024];
21716        rng.fill_bytes(&mut buf);
21717        let mut unstructured = Unstructured::new(&buf);
21718        Self::arbitrary(&mut unstructured).unwrap_or_default()
21719    }
21720}
21721impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21722    fn default() -> Self {
21723        Self::DEFAULT.clone()
21724    }
21725}
21726impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21727    type Message = MavMessage;
21728    const ID: u32 = 12900u32;
21729    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21730    const EXTRA_CRC: u8 = 114u8;
21731    const ENCODED_LEN: usize = 44usize;
21732    fn deser(
21733        _version: MavlinkVersion,
21734        __input: &[u8],
21735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21736        let avail_len = __input.len();
21737        let mut payload_buf = [0; Self::ENCODED_LEN];
21738        let mut buf = if avail_len < Self::ENCODED_LEN {
21739            payload_buf[0..avail_len].copy_from_slice(__input);
21740            Bytes::new(&payload_buf)
21741        } else {
21742            Bytes::new(__input)
21743        };
21744        let mut __struct = Self::default();
21745        __struct.target_system = buf.get_u8();
21746        __struct.target_component = buf.get_u8();
21747        for v in &mut __struct.id_or_mac {
21748            let val = buf.get_u8();
21749            *v = val;
21750        }
21751        let tmp = buf.get_u8();
21752        __struct.id_type =
21753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21754                enum_type: "MavOdidIdType",
21755                value: tmp as u32,
21756            })?;
21757        let tmp = buf.get_u8();
21758        __struct.ua_type =
21759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21760                enum_type: "MavOdidUaType",
21761                value: tmp as u32,
21762            })?;
21763        for v in &mut __struct.uas_id {
21764            let val = buf.get_u8();
21765            *v = val;
21766        }
21767        Ok(__struct)
21768    }
21769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21770        let mut __tmp = BytesMut::new(bytes);
21771        #[allow(clippy::absurd_extreme_comparisons)]
21772        #[allow(unused_comparisons)]
21773        if __tmp.remaining() < Self::ENCODED_LEN {
21774            panic!(
21775                "buffer is too small (need {} bytes, but got {})",
21776                Self::ENCODED_LEN,
21777                __tmp.remaining(),
21778            )
21779        }
21780        __tmp.put_u8(self.target_system);
21781        __tmp.put_u8(self.target_component);
21782        for val in &self.id_or_mac {
21783            __tmp.put_u8(*val);
21784        }
21785        __tmp.put_u8(self.id_type as u8);
21786        __tmp.put_u8(self.ua_type as u8);
21787        for val in &self.uas_id {
21788            __tmp.put_u8(*val);
21789        }
21790        if matches!(version, MavlinkVersion::V2) {
21791            let len = __tmp.len();
21792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21793        } else {
21794            __tmp.len()
21795        }
21796    }
21797}
21798#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21799#[doc = ""]
21800#[doc = "ID: 12901"]
21801#[derive(Debug, Clone, PartialEq)]
21802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21804#[cfg_attr(feature = "ts", derive(TS))]
21805#[cfg_attr(feature = "ts", ts(export))]
21806pub struct OPEN_DRONE_ID_LOCATION_DATA {
21807    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21808    pub latitude: i32,
21809    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21810    pub longitude: i32,
21811    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21812    pub altitude_barometric: f32,
21813    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21814    pub altitude_geodetic: f32,
21815    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21816    pub height: f32,
21817    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21818    pub timestamp: f32,
21819    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21820    pub direction: u16,
21821    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21822    pub speed_horizontal: u16,
21823    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21824    pub speed_vertical: i16,
21825    #[doc = "System ID (0 for broadcast)."]
21826    pub target_system: u8,
21827    #[doc = "Component ID (0 for broadcast)."]
21828    pub target_component: u8,
21829    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21831    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21832    pub id_or_mac: [u8; 20],
21833    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21834    pub status: MavOdidStatus,
21835    #[doc = "Indicates the reference point for the height field."]
21836    pub height_reference: MavOdidHeightRef,
21837    #[doc = "The accuracy of the horizontal position."]
21838    pub horizontal_accuracy: MavOdidHorAcc,
21839    #[doc = "The accuracy of the vertical position."]
21840    pub vertical_accuracy: MavOdidVerAcc,
21841    #[doc = "The accuracy of the barometric altitude."]
21842    pub barometer_accuracy: MavOdidVerAcc,
21843    #[doc = "The accuracy of the horizontal and vertical speed."]
21844    pub speed_accuracy: MavOdidSpeedAcc,
21845    #[doc = "The accuracy of the timestamps."]
21846    pub timestamp_accuracy: MavOdidTimeAcc,
21847}
21848impl OPEN_DRONE_ID_LOCATION_DATA {
21849    pub const ENCODED_LEN: usize = 59usize;
21850    pub const DEFAULT: Self = Self {
21851        latitude: 0_i32,
21852        longitude: 0_i32,
21853        altitude_barometric: 0.0_f32,
21854        altitude_geodetic: 0.0_f32,
21855        height: 0.0_f32,
21856        timestamp: 0.0_f32,
21857        direction: 0_u16,
21858        speed_horizontal: 0_u16,
21859        speed_vertical: 0_i16,
21860        target_system: 0_u8,
21861        target_component: 0_u8,
21862        id_or_mac: [0_u8; 20usize],
21863        status: MavOdidStatus::DEFAULT,
21864        height_reference: MavOdidHeightRef::DEFAULT,
21865        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21866        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21867        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21868        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21869        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21870    };
21871    #[cfg(feature = "arbitrary")]
21872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21873        use arbitrary::{Arbitrary, Unstructured};
21874        let mut buf = [0u8; 1024];
21875        rng.fill_bytes(&mut buf);
21876        let mut unstructured = Unstructured::new(&buf);
21877        Self::arbitrary(&mut unstructured).unwrap_or_default()
21878    }
21879}
21880impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21881    fn default() -> Self {
21882        Self::DEFAULT.clone()
21883    }
21884}
21885impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21886    type Message = MavMessage;
21887    const ID: u32 = 12901u32;
21888    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21889    const EXTRA_CRC: u8 = 254u8;
21890    const ENCODED_LEN: usize = 59usize;
21891    fn deser(
21892        _version: MavlinkVersion,
21893        __input: &[u8],
21894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21895        let avail_len = __input.len();
21896        let mut payload_buf = [0; Self::ENCODED_LEN];
21897        let mut buf = if avail_len < Self::ENCODED_LEN {
21898            payload_buf[0..avail_len].copy_from_slice(__input);
21899            Bytes::new(&payload_buf)
21900        } else {
21901            Bytes::new(__input)
21902        };
21903        let mut __struct = Self::default();
21904        __struct.latitude = buf.get_i32_le();
21905        __struct.longitude = buf.get_i32_le();
21906        __struct.altitude_barometric = buf.get_f32_le();
21907        __struct.altitude_geodetic = buf.get_f32_le();
21908        __struct.height = buf.get_f32_le();
21909        __struct.timestamp = buf.get_f32_le();
21910        __struct.direction = buf.get_u16_le();
21911        __struct.speed_horizontal = buf.get_u16_le();
21912        __struct.speed_vertical = buf.get_i16_le();
21913        __struct.target_system = buf.get_u8();
21914        __struct.target_component = buf.get_u8();
21915        for v in &mut __struct.id_or_mac {
21916            let val = buf.get_u8();
21917            *v = val;
21918        }
21919        let tmp = buf.get_u8();
21920        __struct.status =
21921            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21922                enum_type: "MavOdidStatus",
21923                value: tmp as u32,
21924            })?;
21925        let tmp = buf.get_u8();
21926        __struct.height_reference =
21927            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21928                enum_type: "MavOdidHeightRef",
21929                value: tmp as u32,
21930            })?;
21931        let tmp = buf.get_u8();
21932        __struct.horizontal_accuracy =
21933            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21934                enum_type: "MavOdidHorAcc",
21935                value: tmp as u32,
21936            })?;
21937        let tmp = buf.get_u8();
21938        __struct.vertical_accuracy =
21939            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21940                enum_type: "MavOdidVerAcc",
21941                value: tmp as u32,
21942            })?;
21943        let tmp = buf.get_u8();
21944        __struct.barometer_accuracy =
21945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21946                enum_type: "MavOdidVerAcc",
21947                value: tmp as u32,
21948            })?;
21949        let tmp = buf.get_u8();
21950        __struct.speed_accuracy =
21951            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21952                enum_type: "MavOdidSpeedAcc",
21953                value: tmp as u32,
21954            })?;
21955        let tmp = buf.get_u8();
21956        __struct.timestamp_accuracy =
21957            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21958                enum_type: "MavOdidTimeAcc",
21959                value: tmp as u32,
21960            })?;
21961        Ok(__struct)
21962    }
21963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21964        let mut __tmp = BytesMut::new(bytes);
21965        #[allow(clippy::absurd_extreme_comparisons)]
21966        #[allow(unused_comparisons)]
21967        if __tmp.remaining() < Self::ENCODED_LEN {
21968            panic!(
21969                "buffer is too small (need {} bytes, but got {})",
21970                Self::ENCODED_LEN,
21971                __tmp.remaining(),
21972            )
21973        }
21974        __tmp.put_i32_le(self.latitude);
21975        __tmp.put_i32_le(self.longitude);
21976        __tmp.put_f32_le(self.altitude_barometric);
21977        __tmp.put_f32_le(self.altitude_geodetic);
21978        __tmp.put_f32_le(self.height);
21979        __tmp.put_f32_le(self.timestamp);
21980        __tmp.put_u16_le(self.direction);
21981        __tmp.put_u16_le(self.speed_horizontal);
21982        __tmp.put_i16_le(self.speed_vertical);
21983        __tmp.put_u8(self.target_system);
21984        __tmp.put_u8(self.target_component);
21985        for val in &self.id_or_mac {
21986            __tmp.put_u8(*val);
21987        }
21988        __tmp.put_u8(self.status as u8);
21989        __tmp.put_u8(self.height_reference as u8);
21990        __tmp.put_u8(self.horizontal_accuracy as u8);
21991        __tmp.put_u8(self.vertical_accuracy as u8);
21992        __tmp.put_u8(self.barometer_accuracy as u8);
21993        __tmp.put_u8(self.speed_accuracy as u8);
21994        __tmp.put_u8(self.timestamp_accuracy as u8);
21995        if matches!(version, MavlinkVersion::V2) {
21996            let len = __tmp.len();
21997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21998        } else {
21999            __tmp.len()
22000        }
22001    }
22002}
22003#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22004#[doc = ""]
22005#[doc = "ID: 12915"]
22006#[derive(Debug, Clone, PartialEq)]
22007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22009#[cfg_attr(feature = "ts", derive(TS))]
22010#[cfg_attr(feature = "ts", ts(export))]
22011pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22012    #[doc = "System ID (0 for broadcast)."]
22013    pub target_system: u8,
22014    #[doc = "Component ID (0 for broadcast)."]
22015    pub target_component: u8,
22016    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22018    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22019    pub id_or_mac: [u8; 20],
22020    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22021    pub single_message_size: u8,
22022    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22023    pub msg_pack_size: u8,
22024    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22025    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22026    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22027    pub messages: [u8; 225],
22028}
22029impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22030    pub const ENCODED_LEN: usize = 249usize;
22031    pub const DEFAULT: Self = Self {
22032        target_system: 0_u8,
22033        target_component: 0_u8,
22034        id_or_mac: [0_u8; 20usize],
22035        single_message_size: 0_u8,
22036        msg_pack_size: 0_u8,
22037        messages: [0_u8; 225usize],
22038    };
22039    #[cfg(feature = "arbitrary")]
22040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22041        use arbitrary::{Arbitrary, Unstructured};
22042        let mut buf = [0u8; 1024];
22043        rng.fill_bytes(&mut buf);
22044        let mut unstructured = Unstructured::new(&buf);
22045        Self::arbitrary(&mut unstructured).unwrap_or_default()
22046    }
22047}
22048impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22049    fn default() -> Self {
22050        Self::DEFAULT.clone()
22051    }
22052}
22053impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22054    type Message = MavMessage;
22055    const ID: u32 = 12915u32;
22056    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22057    const EXTRA_CRC: u8 = 94u8;
22058    const ENCODED_LEN: usize = 249usize;
22059    fn deser(
22060        _version: MavlinkVersion,
22061        __input: &[u8],
22062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22063        let avail_len = __input.len();
22064        let mut payload_buf = [0; Self::ENCODED_LEN];
22065        let mut buf = if avail_len < Self::ENCODED_LEN {
22066            payload_buf[0..avail_len].copy_from_slice(__input);
22067            Bytes::new(&payload_buf)
22068        } else {
22069            Bytes::new(__input)
22070        };
22071        let mut __struct = Self::default();
22072        __struct.target_system = buf.get_u8();
22073        __struct.target_component = buf.get_u8();
22074        for v in &mut __struct.id_or_mac {
22075            let val = buf.get_u8();
22076            *v = val;
22077        }
22078        __struct.single_message_size = buf.get_u8();
22079        __struct.msg_pack_size = buf.get_u8();
22080        for v in &mut __struct.messages {
22081            let val = buf.get_u8();
22082            *v = val;
22083        }
22084        Ok(__struct)
22085    }
22086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22087        let mut __tmp = BytesMut::new(bytes);
22088        #[allow(clippy::absurd_extreme_comparisons)]
22089        #[allow(unused_comparisons)]
22090        if __tmp.remaining() < Self::ENCODED_LEN {
22091            panic!(
22092                "buffer is too small (need {} bytes, but got {})",
22093                Self::ENCODED_LEN,
22094                __tmp.remaining(),
22095            )
22096        }
22097        __tmp.put_u8(self.target_system);
22098        __tmp.put_u8(self.target_component);
22099        for val in &self.id_or_mac {
22100            __tmp.put_u8(*val);
22101        }
22102        __tmp.put_u8(self.single_message_size);
22103        __tmp.put_u8(self.msg_pack_size);
22104        for val in &self.messages {
22105            __tmp.put_u8(*val);
22106        }
22107        if matches!(version, MavlinkVersion::V2) {
22108            let len = __tmp.len();
22109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22110        } else {
22111            __tmp.len()
22112        }
22113    }
22114}
22115#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22116#[doc = ""]
22117#[doc = "ID: 12905"]
22118#[derive(Debug, Clone, PartialEq)]
22119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22121#[cfg_attr(feature = "ts", derive(TS))]
22122#[cfg_attr(feature = "ts", ts(export))]
22123pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22124    #[doc = "System ID (0 for broadcast)."]
22125    pub target_system: u8,
22126    #[doc = "Component ID (0 for broadcast)."]
22127    pub target_component: u8,
22128    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22131    pub id_or_mac: [u8; 20],
22132    #[doc = "Indicates the type of the operator_id field."]
22133    pub operator_id_type: MavOdidOperatorIdType,
22134    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22135    #[cfg_attr(feature = "ts", ts(type = "string"))]
22136    pub operator_id: CharArray<20>,
22137}
22138impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22139    pub const ENCODED_LEN: usize = 43usize;
22140    pub const DEFAULT: Self = Self {
22141        target_system: 0_u8,
22142        target_component: 0_u8,
22143        id_or_mac: [0_u8; 20usize],
22144        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22145        operator_id: CharArray::new([0_u8; 20usize]),
22146    };
22147    #[cfg(feature = "arbitrary")]
22148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22149        use arbitrary::{Arbitrary, Unstructured};
22150        let mut buf = [0u8; 1024];
22151        rng.fill_bytes(&mut buf);
22152        let mut unstructured = Unstructured::new(&buf);
22153        Self::arbitrary(&mut unstructured).unwrap_or_default()
22154    }
22155}
22156impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22157    fn default() -> Self {
22158        Self::DEFAULT.clone()
22159    }
22160}
22161impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22162    type Message = MavMessage;
22163    const ID: u32 = 12905u32;
22164    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22165    const EXTRA_CRC: u8 = 49u8;
22166    const ENCODED_LEN: usize = 43usize;
22167    fn deser(
22168        _version: MavlinkVersion,
22169        __input: &[u8],
22170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22171        let avail_len = __input.len();
22172        let mut payload_buf = [0; Self::ENCODED_LEN];
22173        let mut buf = if avail_len < Self::ENCODED_LEN {
22174            payload_buf[0..avail_len].copy_from_slice(__input);
22175            Bytes::new(&payload_buf)
22176        } else {
22177            Bytes::new(__input)
22178        };
22179        let mut __struct = Self::default();
22180        __struct.target_system = buf.get_u8();
22181        __struct.target_component = buf.get_u8();
22182        for v in &mut __struct.id_or_mac {
22183            let val = buf.get_u8();
22184            *v = val;
22185        }
22186        let tmp = buf.get_u8();
22187        __struct.operator_id_type =
22188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22189                enum_type: "MavOdidOperatorIdType",
22190                value: tmp as u32,
22191            })?;
22192        let mut tmp = [0_u8; 20usize];
22193        for v in &mut tmp {
22194            *v = buf.get_u8();
22195        }
22196        __struct.operator_id = CharArray::new(tmp);
22197        Ok(__struct)
22198    }
22199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22200        let mut __tmp = BytesMut::new(bytes);
22201        #[allow(clippy::absurd_extreme_comparisons)]
22202        #[allow(unused_comparisons)]
22203        if __tmp.remaining() < Self::ENCODED_LEN {
22204            panic!(
22205                "buffer is too small (need {} bytes, but got {})",
22206                Self::ENCODED_LEN,
22207                __tmp.remaining(),
22208            )
22209        }
22210        __tmp.put_u8(self.target_system);
22211        __tmp.put_u8(self.target_component);
22212        for val in &self.id_or_mac {
22213            __tmp.put_u8(*val);
22214        }
22215        __tmp.put_u8(self.operator_id_type as u8);
22216        for val in &self.operator_id {
22217            __tmp.put_u8(*val);
22218        }
22219        if matches!(version, MavlinkVersion::V2) {
22220            let len = __tmp.len();
22221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22222        } else {
22223            __tmp.len()
22224        }
22225    }
22226}
22227#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22228#[doc = ""]
22229#[doc = "ID: 12903"]
22230#[derive(Debug, Clone, PartialEq)]
22231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22233#[cfg_attr(feature = "ts", derive(TS))]
22234#[cfg_attr(feature = "ts", ts(export))]
22235pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22236    #[doc = "System ID (0 for broadcast)."]
22237    pub target_system: u8,
22238    #[doc = "Component ID (0 for broadcast)."]
22239    pub target_component: u8,
22240    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22243    pub id_or_mac: [u8; 20],
22244    #[doc = "Indicates the type of the description field."]
22245    pub description_type: MavOdidDescType,
22246    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22247    #[cfg_attr(feature = "ts", ts(type = "string"))]
22248    pub description: CharArray<23>,
22249}
22250impl OPEN_DRONE_ID_SELF_ID_DATA {
22251    pub const ENCODED_LEN: usize = 46usize;
22252    pub const DEFAULT: Self = Self {
22253        target_system: 0_u8,
22254        target_component: 0_u8,
22255        id_or_mac: [0_u8; 20usize],
22256        description_type: MavOdidDescType::DEFAULT,
22257        description: CharArray::new([0_u8; 23usize]),
22258    };
22259    #[cfg(feature = "arbitrary")]
22260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22261        use arbitrary::{Arbitrary, Unstructured};
22262        let mut buf = [0u8; 1024];
22263        rng.fill_bytes(&mut buf);
22264        let mut unstructured = Unstructured::new(&buf);
22265        Self::arbitrary(&mut unstructured).unwrap_or_default()
22266    }
22267}
22268impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22269    fn default() -> Self {
22270        Self::DEFAULT.clone()
22271    }
22272}
22273impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22274    type Message = MavMessage;
22275    const ID: u32 = 12903u32;
22276    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22277    const EXTRA_CRC: u8 = 249u8;
22278    const ENCODED_LEN: usize = 46usize;
22279    fn deser(
22280        _version: MavlinkVersion,
22281        __input: &[u8],
22282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22283        let avail_len = __input.len();
22284        let mut payload_buf = [0; Self::ENCODED_LEN];
22285        let mut buf = if avail_len < Self::ENCODED_LEN {
22286            payload_buf[0..avail_len].copy_from_slice(__input);
22287            Bytes::new(&payload_buf)
22288        } else {
22289            Bytes::new(__input)
22290        };
22291        let mut __struct = Self::default();
22292        __struct.target_system = buf.get_u8();
22293        __struct.target_component = buf.get_u8();
22294        for v in &mut __struct.id_or_mac {
22295            let val = buf.get_u8();
22296            *v = val;
22297        }
22298        let tmp = buf.get_u8();
22299        __struct.description_type =
22300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22301                enum_type: "MavOdidDescType",
22302                value: tmp as u32,
22303            })?;
22304        let mut tmp = [0_u8; 23usize];
22305        for v in &mut tmp {
22306            *v = buf.get_u8();
22307        }
22308        __struct.description = CharArray::new(tmp);
22309        Ok(__struct)
22310    }
22311    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22312        let mut __tmp = BytesMut::new(bytes);
22313        #[allow(clippy::absurd_extreme_comparisons)]
22314        #[allow(unused_comparisons)]
22315        if __tmp.remaining() < Self::ENCODED_LEN {
22316            panic!(
22317                "buffer is too small (need {} bytes, but got {})",
22318                Self::ENCODED_LEN,
22319                __tmp.remaining(),
22320            )
22321        }
22322        __tmp.put_u8(self.target_system);
22323        __tmp.put_u8(self.target_component);
22324        for val in &self.id_or_mac {
22325            __tmp.put_u8(*val);
22326        }
22327        __tmp.put_u8(self.description_type as u8);
22328        for val in &self.description {
22329            __tmp.put_u8(*val);
22330        }
22331        if matches!(version, MavlinkVersion::V2) {
22332            let len = __tmp.len();
22333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22334        } else {
22335            __tmp.len()
22336        }
22337    }
22338}
22339#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22340#[doc = ""]
22341#[doc = "ID: 12904"]
22342#[derive(Debug, Clone, PartialEq)]
22343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22345#[cfg_attr(feature = "ts", derive(TS))]
22346#[cfg_attr(feature = "ts", ts(export))]
22347pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22348    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22349    pub operator_latitude: i32,
22350    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22351    pub operator_longitude: i32,
22352    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22353    pub area_ceiling: f32,
22354    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22355    pub area_floor: f32,
22356    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22357    pub operator_altitude_geo: f32,
22358    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22359    pub timestamp: u32,
22360    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22361    pub area_count: u16,
22362    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22363    pub area_radius: u16,
22364    #[doc = "System ID (0 for broadcast)."]
22365    pub target_system: u8,
22366    #[doc = "Component ID (0 for broadcast)."]
22367    pub target_component: u8,
22368    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22370    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22371    pub id_or_mac: [u8; 20],
22372    #[doc = "Specifies the operator location type."]
22373    pub operator_location_type: MavOdidOperatorLocationType,
22374    #[doc = "Specifies the classification type of the UA."]
22375    pub classification_type: MavOdidClassificationType,
22376    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22377    pub category_eu: MavOdidCategoryEu,
22378    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22379    pub class_eu: MavOdidClassEu,
22380}
22381impl OPEN_DRONE_ID_SYSTEM_DATA {
22382    pub const ENCODED_LEN: usize = 54usize;
22383    pub const DEFAULT: Self = Self {
22384        operator_latitude: 0_i32,
22385        operator_longitude: 0_i32,
22386        area_ceiling: 0.0_f32,
22387        area_floor: 0.0_f32,
22388        operator_altitude_geo: 0.0_f32,
22389        timestamp: 0_u32,
22390        area_count: 0_u16,
22391        area_radius: 0_u16,
22392        target_system: 0_u8,
22393        target_component: 0_u8,
22394        id_or_mac: [0_u8; 20usize],
22395        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22396        classification_type: MavOdidClassificationType::DEFAULT,
22397        category_eu: MavOdidCategoryEu::DEFAULT,
22398        class_eu: MavOdidClassEu::DEFAULT,
22399    };
22400    #[cfg(feature = "arbitrary")]
22401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22402        use arbitrary::{Arbitrary, Unstructured};
22403        let mut buf = [0u8; 1024];
22404        rng.fill_bytes(&mut buf);
22405        let mut unstructured = Unstructured::new(&buf);
22406        Self::arbitrary(&mut unstructured).unwrap_or_default()
22407    }
22408}
22409impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22410    fn default() -> Self {
22411        Self::DEFAULT.clone()
22412    }
22413}
22414impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22415    type Message = MavMessage;
22416    const ID: u32 = 12904u32;
22417    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22418    const EXTRA_CRC: u8 = 77u8;
22419    const ENCODED_LEN: usize = 54usize;
22420    fn deser(
22421        _version: MavlinkVersion,
22422        __input: &[u8],
22423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22424        let avail_len = __input.len();
22425        let mut payload_buf = [0; Self::ENCODED_LEN];
22426        let mut buf = if avail_len < Self::ENCODED_LEN {
22427            payload_buf[0..avail_len].copy_from_slice(__input);
22428            Bytes::new(&payload_buf)
22429        } else {
22430            Bytes::new(__input)
22431        };
22432        let mut __struct = Self::default();
22433        __struct.operator_latitude = buf.get_i32_le();
22434        __struct.operator_longitude = buf.get_i32_le();
22435        __struct.area_ceiling = buf.get_f32_le();
22436        __struct.area_floor = buf.get_f32_le();
22437        __struct.operator_altitude_geo = buf.get_f32_le();
22438        __struct.timestamp = buf.get_u32_le();
22439        __struct.area_count = buf.get_u16_le();
22440        __struct.area_radius = buf.get_u16_le();
22441        __struct.target_system = buf.get_u8();
22442        __struct.target_component = buf.get_u8();
22443        for v in &mut __struct.id_or_mac {
22444            let val = buf.get_u8();
22445            *v = val;
22446        }
22447        let tmp = buf.get_u8();
22448        __struct.operator_location_type =
22449            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22450                enum_type: "MavOdidOperatorLocationType",
22451                value: tmp as u32,
22452            })?;
22453        let tmp = buf.get_u8();
22454        __struct.classification_type =
22455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22456                enum_type: "MavOdidClassificationType",
22457                value: tmp as u32,
22458            })?;
22459        let tmp = buf.get_u8();
22460        __struct.category_eu =
22461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22462                enum_type: "MavOdidCategoryEu",
22463                value: tmp as u32,
22464            })?;
22465        let tmp = buf.get_u8();
22466        __struct.class_eu =
22467            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22468                enum_type: "MavOdidClassEu",
22469                value: tmp as u32,
22470            })?;
22471        Ok(__struct)
22472    }
22473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22474        let mut __tmp = BytesMut::new(bytes);
22475        #[allow(clippy::absurd_extreme_comparisons)]
22476        #[allow(unused_comparisons)]
22477        if __tmp.remaining() < Self::ENCODED_LEN {
22478            panic!(
22479                "buffer is too small (need {} bytes, but got {})",
22480                Self::ENCODED_LEN,
22481                __tmp.remaining(),
22482            )
22483        }
22484        __tmp.put_i32_le(self.operator_latitude);
22485        __tmp.put_i32_le(self.operator_longitude);
22486        __tmp.put_f32_le(self.area_ceiling);
22487        __tmp.put_f32_le(self.area_floor);
22488        __tmp.put_f32_le(self.operator_altitude_geo);
22489        __tmp.put_u32_le(self.timestamp);
22490        __tmp.put_u16_le(self.area_count);
22491        __tmp.put_u16_le(self.area_radius);
22492        __tmp.put_u8(self.target_system);
22493        __tmp.put_u8(self.target_component);
22494        for val in &self.id_or_mac {
22495            __tmp.put_u8(*val);
22496        }
22497        __tmp.put_u8(self.operator_location_type as u8);
22498        __tmp.put_u8(self.classification_type as u8);
22499        __tmp.put_u8(self.category_eu as u8);
22500        __tmp.put_u8(self.class_eu as u8);
22501        if matches!(version, MavlinkVersion::V2) {
22502            let len = __tmp.len();
22503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22504        } else {
22505            __tmp.len()
22506        }
22507    }
22508}
22509#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22510#[doc = ""]
22511#[doc = "ID: 12919"]
22512#[derive(Debug, Clone, PartialEq)]
22513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22515#[cfg_attr(feature = "ts", derive(TS))]
22516#[cfg_attr(feature = "ts", ts(export))]
22517pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22518    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22519    pub operator_latitude: i32,
22520    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22521    pub operator_longitude: i32,
22522    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22523    pub operator_altitude_geo: f32,
22524    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22525    pub timestamp: u32,
22526    #[doc = "System ID (0 for broadcast)."]
22527    pub target_system: u8,
22528    #[doc = "Component ID (0 for broadcast)."]
22529    pub target_component: u8,
22530}
22531impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22532    pub const ENCODED_LEN: usize = 18usize;
22533    pub const DEFAULT: Self = Self {
22534        operator_latitude: 0_i32,
22535        operator_longitude: 0_i32,
22536        operator_altitude_geo: 0.0_f32,
22537        timestamp: 0_u32,
22538        target_system: 0_u8,
22539        target_component: 0_u8,
22540    };
22541    #[cfg(feature = "arbitrary")]
22542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22543        use arbitrary::{Arbitrary, Unstructured};
22544        let mut buf = [0u8; 1024];
22545        rng.fill_bytes(&mut buf);
22546        let mut unstructured = Unstructured::new(&buf);
22547        Self::arbitrary(&mut unstructured).unwrap_or_default()
22548    }
22549}
22550impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22551    fn default() -> Self {
22552        Self::DEFAULT.clone()
22553    }
22554}
22555impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22556    type Message = MavMessage;
22557    const ID: u32 = 12919u32;
22558    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22559    const EXTRA_CRC: u8 = 7u8;
22560    const ENCODED_LEN: usize = 18usize;
22561    fn deser(
22562        _version: MavlinkVersion,
22563        __input: &[u8],
22564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22565        let avail_len = __input.len();
22566        let mut payload_buf = [0; Self::ENCODED_LEN];
22567        let mut buf = if avail_len < Self::ENCODED_LEN {
22568            payload_buf[0..avail_len].copy_from_slice(__input);
22569            Bytes::new(&payload_buf)
22570        } else {
22571            Bytes::new(__input)
22572        };
22573        let mut __struct = Self::default();
22574        __struct.operator_latitude = buf.get_i32_le();
22575        __struct.operator_longitude = buf.get_i32_le();
22576        __struct.operator_altitude_geo = buf.get_f32_le();
22577        __struct.timestamp = buf.get_u32_le();
22578        __struct.target_system = buf.get_u8();
22579        __struct.target_component = buf.get_u8();
22580        Ok(__struct)
22581    }
22582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22583        let mut __tmp = BytesMut::new(bytes);
22584        #[allow(clippy::absurd_extreme_comparisons)]
22585        #[allow(unused_comparisons)]
22586        if __tmp.remaining() < Self::ENCODED_LEN {
22587            panic!(
22588                "buffer is too small (need {} bytes, but got {})",
22589                Self::ENCODED_LEN,
22590                __tmp.remaining(),
22591            )
22592        }
22593        __tmp.put_i32_le(self.operator_latitude);
22594        __tmp.put_i32_le(self.operator_longitude);
22595        __tmp.put_f32_le(self.operator_altitude_geo);
22596        __tmp.put_u32_le(self.timestamp);
22597        __tmp.put_u8(self.target_system);
22598        __tmp.put_u8(self.target_component);
22599        if matches!(version, MavlinkVersion::V2) {
22600            let len = __tmp.len();
22601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22602        } else {
22603            __tmp.len()
22604        }
22605    }
22606}
22607#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22608#[doc = ""]
22609#[doc = "ID: 100"]
22610#[derive(Debug, Clone, PartialEq)]
22611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22613#[cfg_attr(feature = "ts", derive(TS))]
22614#[cfg_attr(feature = "ts", ts(export))]
22615pub struct OPTICAL_FLOW_DATA {
22616    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22617    pub time_usec: u64,
22618    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22619    pub flow_comp_m_x: f32,
22620    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22621    pub flow_comp_m_y: f32,
22622    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22623    pub ground_distance: f32,
22624    #[doc = "Flow in x-sensor direction"]
22625    pub flow_x: i16,
22626    #[doc = "Flow in y-sensor direction"]
22627    pub flow_y: i16,
22628    #[doc = "Sensor ID"]
22629    pub sensor_id: u8,
22630    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22631    pub quality: u8,
22632    #[doc = "Flow rate about X axis"]
22633    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22634    pub flow_rate_x: f32,
22635    #[doc = "Flow rate about Y axis"]
22636    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22637    pub flow_rate_y: f32,
22638}
22639impl OPTICAL_FLOW_DATA {
22640    pub const ENCODED_LEN: usize = 34usize;
22641    pub const DEFAULT: Self = Self {
22642        time_usec: 0_u64,
22643        flow_comp_m_x: 0.0_f32,
22644        flow_comp_m_y: 0.0_f32,
22645        ground_distance: 0.0_f32,
22646        flow_x: 0_i16,
22647        flow_y: 0_i16,
22648        sensor_id: 0_u8,
22649        quality: 0_u8,
22650        flow_rate_x: 0.0_f32,
22651        flow_rate_y: 0.0_f32,
22652    };
22653    #[cfg(feature = "arbitrary")]
22654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22655        use arbitrary::{Arbitrary, Unstructured};
22656        let mut buf = [0u8; 1024];
22657        rng.fill_bytes(&mut buf);
22658        let mut unstructured = Unstructured::new(&buf);
22659        Self::arbitrary(&mut unstructured).unwrap_or_default()
22660    }
22661}
22662impl Default for OPTICAL_FLOW_DATA {
22663    fn default() -> Self {
22664        Self::DEFAULT.clone()
22665    }
22666}
22667impl MessageData for OPTICAL_FLOW_DATA {
22668    type Message = MavMessage;
22669    const ID: u32 = 100u32;
22670    const NAME: &'static str = "OPTICAL_FLOW";
22671    const EXTRA_CRC: u8 = 175u8;
22672    const ENCODED_LEN: usize = 34usize;
22673    fn deser(
22674        _version: MavlinkVersion,
22675        __input: &[u8],
22676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22677        let avail_len = __input.len();
22678        let mut payload_buf = [0; Self::ENCODED_LEN];
22679        let mut buf = if avail_len < Self::ENCODED_LEN {
22680            payload_buf[0..avail_len].copy_from_slice(__input);
22681            Bytes::new(&payload_buf)
22682        } else {
22683            Bytes::new(__input)
22684        };
22685        let mut __struct = Self::default();
22686        __struct.time_usec = buf.get_u64_le();
22687        __struct.flow_comp_m_x = buf.get_f32_le();
22688        __struct.flow_comp_m_y = buf.get_f32_le();
22689        __struct.ground_distance = buf.get_f32_le();
22690        __struct.flow_x = buf.get_i16_le();
22691        __struct.flow_y = buf.get_i16_le();
22692        __struct.sensor_id = buf.get_u8();
22693        __struct.quality = buf.get_u8();
22694        __struct.flow_rate_x = buf.get_f32_le();
22695        __struct.flow_rate_y = buf.get_f32_le();
22696        Ok(__struct)
22697    }
22698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22699        let mut __tmp = BytesMut::new(bytes);
22700        #[allow(clippy::absurd_extreme_comparisons)]
22701        #[allow(unused_comparisons)]
22702        if __tmp.remaining() < Self::ENCODED_LEN {
22703            panic!(
22704                "buffer is too small (need {} bytes, but got {})",
22705                Self::ENCODED_LEN,
22706                __tmp.remaining(),
22707            )
22708        }
22709        __tmp.put_u64_le(self.time_usec);
22710        __tmp.put_f32_le(self.flow_comp_m_x);
22711        __tmp.put_f32_le(self.flow_comp_m_y);
22712        __tmp.put_f32_le(self.ground_distance);
22713        __tmp.put_i16_le(self.flow_x);
22714        __tmp.put_i16_le(self.flow_y);
22715        __tmp.put_u8(self.sensor_id);
22716        __tmp.put_u8(self.quality);
22717        if matches!(version, MavlinkVersion::V2) {
22718            __tmp.put_f32_le(self.flow_rate_x);
22719            __tmp.put_f32_le(self.flow_rate_y);
22720            let len = __tmp.len();
22721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22722        } else {
22723            __tmp.len()
22724        }
22725    }
22726}
22727#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22728#[doc = ""]
22729#[doc = "ID: 106"]
22730#[derive(Debug, Clone, PartialEq)]
22731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22733#[cfg_attr(feature = "ts", derive(TS))]
22734#[cfg_attr(feature = "ts", ts(export))]
22735pub struct OPTICAL_FLOW_RAD_DATA {
22736    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22737    pub time_usec: u64,
22738    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22739    pub integration_time_us: u32,
22740    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22741    pub integrated_x: f32,
22742    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22743    pub integrated_y: f32,
22744    #[doc = "RH rotation around X axis"]
22745    pub integrated_xgyro: f32,
22746    #[doc = "RH rotation around Y axis"]
22747    pub integrated_ygyro: f32,
22748    #[doc = "RH rotation around Z axis"]
22749    pub integrated_zgyro: f32,
22750    #[doc = "Time since the distance was sampled."]
22751    pub time_delta_distance_us: u32,
22752    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22753    pub distance: f32,
22754    #[doc = "Temperature"]
22755    pub temperature: i16,
22756    #[doc = "Sensor ID"]
22757    pub sensor_id: u8,
22758    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22759    pub quality: u8,
22760}
22761impl OPTICAL_FLOW_RAD_DATA {
22762    pub const ENCODED_LEN: usize = 44usize;
22763    pub const DEFAULT: Self = Self {
22764        time_usec: 0_u64,
22765        integration_time_us: 0_u32,
22766        integrated_x: 0.0_f32,
22767        integrated_y: 0.0_f32,
22768        integrated_xgyro: 0.0_f32,
22769        integrated_ygyro: 0.0_f32,
22770        integrated_zgyro: 0.0_f32,
22771        time_delta_distance_us: 0_u32,
22772        distance: 0.0_f32,
22773        temperature: 0_i16,
22774        sensor_id: 0_u8,
22775        quality: 0_u8,
22776    };
22777    #[cfg(feature = "arbitrary")]
22778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22779        use arbitrary::{Arbitrary, Unstructured};
22780        let mut buf = [0u8; 1024];
22781        rng.fill_bytes(&mut buf);
22782        let mut unstructured = Unstructured::new(&buf);
22783        Self::arbitrary(&mut unstructured).unwrap_or_default()
22784    }
22785}
22786impl Default for OPTICAL_FLOW_RAD_DATA {
22787    fn default() -> Self {
22788        Self::DEFAULT.clone()
22789    }
22790}
22791impl MessageData for OPTICAL_FLOW_RAD_DATA {
22792    type Message = MavMessage;
22793    const ID: u32 = 106u32;
22794    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22795    const EXTRA_CRC: u8 = 138u8;
22796    const ENCODED_LEN: usize = 44usize;
22797    fn deser(
22798        _version: MavlinkVersion,
22799        __input: &[u8],
22800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22801        let avail_len = __input.len();
22802        let mut payload_buf = [0; Self::ENCODED_LEN];
22803        let mut buf = if avail_len < Self::ENCODED_LEN {
22804            payload_buf[0..avail_len].copy_from_slice(__input);
22805            Bytes::new(&payload_buf)
22806        } else {
22807            Bytes::new(__input)
22808        };
22809        let mut __struct = Self::default();
22810        __struct.time_usec = buf.get_u64_le();
22811        __struct.integration_time_us = buf.get_u32_le();
22812        __struct.integrated_x = buf.get_f32_le();
22813        __struct.integrated_y = buf.get_f32_le();
22814        __struct.integrated_xgyro = buf.get_f32_le();
22815        __struct.integrated_ygyro = buf.get_f32_le();
22816        __struct.integrated_zgyro = buf.get_f32_le();
22817        __struct.time_delta_distance_us = buf.get_u32_le();
22818        __struct.distance = buf.get_f32_le();
22819        __struct.temperature = buf.get_i16_le();
22820        __struct.sensor_id = buf.get_u8();
22821        __struct.quality = buf.get_u8();
22822        Ok(__struct)
22823    }
22824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22825        let mut __tmp = BytesMut::new(bytes);
22826        #[allow(clippy::absurd_extreme_comparisons)]
22827        #[allow(unused_comparisons)]
22828        if __tmp.remaining() < Self::ENCODED_LEN {
22829            panic!(
22830                "buffer is too small (need {} bytes, but got {})",
22831                Self::ENCODED_LEN,
22832                __tmp.remaining(),
22833            )
22834        }
22835        __tmp.put_u64_le(self.time_usec);
22836        __tmp.put_u32_le(self.integration_time_us);
22837        __tmp.put_f32_le(self.integrated_x);
22838        __tmp.put_f32_le(self.integrated_y);
22839        __tmp.put_f32_le(self.integrated_xgyro);
22840        __tmp.put_f32_le(self.integrated_ygyro);
22841        __tmp.put_f32_le(self.integrated_zgyro);
22842        __tmp.put_u32_le(self.time_delta_distance_us);
22843        __tmp.put_f32_le(self.distance);
22844        __tmp.put_i16_le(self.temperature);
22845        __tmp.put_u8(self.sensor_id);
22846        __tmp.put_u8(self.quality);
22847        if matches!(version, MavlinkVersion::V2) {
22848            let len = __tmp.len();
22849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22850        } else {
22851            __tmp.len()
22852        }
22853    }
22854}
22855#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22856#[doc = ""]
22857#[doc = "ID: 360"]
22858#[derive(Debug, Clone, PartialEq)]
22859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22861#[cfg_attr(feature = "ts", derive(TS))]
22862#[cfg_attr(feature = "ts", ts(export))]
22863pub struct ORBIT_EXECUTION_STATUS_DATA {
22864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22865    pub time_usec: u64,
22866    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22867    pub radius: f32,
22868    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22869    pub x: i32,
22870    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22871    pub y: i32,
22872    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22873    pub z: f32,
22874    #[doc = "The coordinate system of the fields: x, y, z."]
22875    pub frame: MavFrame,
22876}
22877impl ORBIT_EXECUTION_STATUS_DATA {
22878    pub const ENCODED_LEN: usize = 25usize;
22879    pub const DEFAULT: Self = Self {
22880        time_usec: 0_u64,
22881        radius: 0.0_f32,
22882        x: 0_i32,
22883        y: 0_i32,
22884        z: 0.0_f32,
22885        frame: MavFrame::DEFAULT,
22886    };
22887    #[cfg(feature = "arbitrary")]
22888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22889        use arbitrary::{Arbitrary, Unstructured};
22890        let mut buf = [0u8; 1024];
22891        rng.fill_bytes(&mut buf);
22892        let mut unstructured = Unstructured::new(&buf);
22893        Self::arbitrary(&mut unstructured).unwrap_or_default()
22894    }
22895}
22896impl Default for ORBIT_EXECUTION_STATUS_DATA {
22897    fn default() -> Self {
22898        Self::DEFAULT.clone()
22899    }
22900}
22901impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22902    type Message = MavMessage;
22903    const ID: u32 = 360u32;
22904    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22905    const EXTRA_CRC: u8 = 11u8;
22906    const ENCODED_LEN: usize = 25usize;
22907    fn deser(
22908        _version: MavlinkVersion,
22909        __input: &[u8],
22910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22911        let avail_len = __input.len();
22912        let mut payload_buf = [0; Self::ENCODED_LEN];
22913        let mut buf = if avail_len < Self::ENCODED_LEN {
22914            payload_buf[0..avail_len].copy_from_slice(__input);
22915            Bytes::new(&payload_buf)
22916        } else {
22917            Bytes::new(__input)
22918        };
22919        let mut __struct = Self::default();
22920        __struct.time_usec = buf.get_u64_le();
22921        __struct.radius = buf.get_f32_le();
22922        __struct.x = buf.get_i32_le();
22923        __struct.y = buf.get_i32_le();
22924        __struct.z = buf.get_f32_le();
22925        let tmp = buf.get_u8();
22926        __struct.frame =
22927            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22928                enum_type: "MavFrame",
22929                value: tmp as u32,
22930            })?;
22931        Ok(__struct)
22932    }
22933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22934        let mut __tmp = BytesMut::new(bytes);
22935        #[allow(clippy::absurd_extreme_comparisons)]
22936        #[allow(unused_comparisons)]
22937        if __tmp.remaining() < Self::ENCODED_LEN {
22938            panic!(
22939                "buffer is too small (need {} bytes, but got {})",
22940                Self::ENCODED_LEN,
22941                __tmp.remaining(),
22942            )
22943        }
22944        __tmp.put_u64_le(self.time_usec);
22945        __tmp.put_f32_le(self.radius);
22946        __tmp.put_i32_le(self.x);
22947        __tmp.put_i32_le(self.y);
22948        __tmp.put_f32_le(self.z);
22949        __tmp.put_u8(self.frame as u8);
22950        if matches!(version, MavlinkVersion::V2) {
22951            let len = __tmp.len();
22952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22953        } else {
22954            __tmp.len()
22955        }
22956    }
22957}
22958#[doc = "Response from a PARAM_EXT_SET message."]
22959#[doc = ""]
22960#[doc = "ID: 324"]
22961#[derive(Debug, Clone, PartialEq)]
22962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22964#[cfg_attr(feature = "ts", derive(TS))]
22965#[cfg_attr(feature = "ts", ts(export))]
22966pub struct PARAM_EXT_ACK_DATA {
22967    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22968    #[cfg_attr(feature = "ts", ts(type = "string"))]
22969    pub param_id: CharArray<16>,
22970    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22971    #[cfg_attr(feature = "ts", ts(type = "string"))]
22972    pub param_value: CharArray<128>,
22973    #[doc = "Parameter type."]
22974    pub param_type: MavParamExtType,
22975    #[doc = "Result code."]
22976    pub param_result: ParamAck,
22977}
22978impl PARAM_EXT_ACK_DATA {
22979    pub const ENCODED_LEN: usize = 146usize;
22980    pub const DEFAULT: Self = Self {
22981        param_id: CharArray::new([0_u8; 16usize]),
22982        param_value: CharArray::new([0_u8; 128usize]),
22983        param_type: MavParamExtType::DEFAULT,
22984        param_result: ParamAck::DEFAULT,
22985    };
22986    #[cfg(feature = "arbitrary")]
22987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22988        use arbitrary::{Arbitrary, Unstructured};
22989        let mut buf = [0u8; 1024];
22990        rng.fill_bytes(&mut buf);
22991        let mut unstructured = Unstructured::new(&buf);
22992        Self::arbitrary(&mut unstructured).unwrap_or_default()
22993    }
22994}
22995impl Default for PARAM_EXT_ACK_DATA {
22996    fn default() -> Self {
22997        Self::DEFAULT.clone()
22998    }
22999}
23000impl MessageData for PARAM_EXT_ACK_DATA {
23001    type Message = MavMessage;
23002    const ID: u32 = 324u32;
23003    const NAME: &'static str = "PARAM_EXT_ACK";
23004    const EXTRA_CRC: u8 = 132u8;
23005    const ENCODED_LEN: usize = 146usize;
23006    fn deser(
23007        _version: MavlinkVersion,
23008        __input: &[u8],
23009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23010        let avail_len = __input.len();
23011        let mut payload_buf = [0; Self::ENCODED_LEN];
23012        let mut buf = if avail_len < Self::ENCODED_LEN {
23013            payload_buf[0..avail_len].copy_from_slice(__input);
23014            Bytes::new(&payload_buf)
23015        } else {
23016            Bytes::new(__input)
23017        };
23018        let mut __struct = Self::default();
23019        let mut tmp = [0_u8; 16usize];
23020        for v in &mut tmp {
23021            *v = buf.get_u8();
23022        }
23023        __struct.param_id = CharArray::new(tmp);
23024        let mut tmp = [0_u8; 128usize];
23025        for v in &mut tmp {
23026            *v = buf.get_u8();
23027        }
23028        __struct.param_value = CharArray::new(tmp);
23029        let tmp = buf.get_u8();
23030        __struct.param_type =
23031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23032                enum_type: "MavParamExtType",
23033                value: tmp as u32,
23034            })?;
23035        let tmp = buf.get_u8();
23036        __struct.param_result =
23037            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23038                enum_type: "ParamAck",
23039                value: tmp as u32,
23040            })?;
23041        Ok(__struct)
23042    }
23043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23044        let mut __tmp = BytesMut::new(bytes);
23045        #[allow(clippy::absurd_extreme_comparisons)]
23046        #[allow(unused_comparisons)]
23047        if __tmp.remaining() < Self::ENCODED_LEN {
23048            panic!(
23049                "buffer is too small (need {} bytes, but got {})",
23050                Self::ENCODED_LEN,
23051                __tmp.remaining(),
23052            )
23053        }
23054        for val in &self.param_id {
23055            __tmp.put_u8(*val);
23056        }
23057        for val in &self.param_value {
23058            __tmp.put_u8(*val);
23059        }
23060        __tmp.put_u8(self.param_type as u8);
23061        __tmp.put_u8(self.param_result as u8);
23062        if matches!(version, MavlinkVersion::V2) {
23063            let len = __tmp.len();
23064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23065        } else {
23066            __tmp.len()
23067        }
23068    }
23069}
23070#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23071#[doc = ""]
23072#[doc = "ID: 321"]
23073#[derive(Debug, Clone, PartialEq)]
23074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23076#[cfg_attr(feature = "ts", derive(TS))]
23077#[cfg_attr(feature = "ts", ts(export))]
23078pub struct PARAM_EXT_REQUEST_LIST_DATA {
23079    #[doc = "System ID"]
23080    pub target_system: u8,
23081    #[doc = "Component ID"]
23082    pub target_component: u8,
23083}
23084impl PARAM_EXT_REQUEST_LIST_DATA {
23085    pub const ENCODED_LEN: usize = 2usize;
23086    pub const DEFAULT: Self = Self {
23087        target_system: 0_u8,
23088        target_component: 0_u8,
23089    };
23090    #[cfg(feature = "arbitrary")]
23091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23092        use arbitrary::{Arbitrary, Unstructured};
23093        let mut buf = [0u8; 1024];
23094        rng.fill_bytes(&mut buf);
23095        let mut unstructured = Unstructured::new(&buf);
23096        Self::arbitrary(&mut unstructured).unwrap_or_default()
23097    }
23098}
23099impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23100    fn default() -> Self {
23101        Self::DEFAULT.clone()
23102    }
23103}
23104impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23105    type Message = MavMessage;
23106    const ID: u32 = 321u32;
23107    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23108    const EXTRA_CRC: u8 = 88u8;
23109    const ENCODED_LEN: usize = 2usize;
23110    fn deser(
23111        _version: MavlinkVersion,
23112        __input: &[u8],
23113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23114        let avail_len = __input.len();
23115        let mut payload_buf = [0; Self::ENCODED_LEN];
23116        let mut buf = if avail_len < Self::ENCODED_LEN {
23117            payload_buf[0..avail_len].copy_from_slice(__input);
23118            Bytes::new(&payload_buf)
23119        } else {
23120            Bytes::new(__input)
23121        };
23122        let mut __struct = Self::default();
23123        __struct.target_system = buf.get_u8();
23124        __struct.target_component = buf.get_u8();
23125        Ok(__struct)
23126    }
23127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23128        let mut __tmp = BytesMut::new(bytes);
23129        #[allow(clippy::absurd_extreme_comparisons)]
23130        #[allow(unused_comparisons)]
23131        if __tmp.remaining() < Self::ENCODED_LEN {
23132            panic!(
23133                "buffer is too small (need {} bytes, but got {})",
23134                Self::ENCODED_LEN,
23135                __tmp.remaining(),
23136            )
23137        }
23138        __tmp.put_u8(self.target_system);
23139        __tmp.put_u8(self.target_component);
23140        if matches!(version, MavlinkVersion::V2) {
23141            let len = __tmp.len();
23142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23143        } else {
23144            __tmp.len()
23145        }
23146    }
23147}
23148#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23149#[doc = ""]
23150#[doc = "ID: 320"]
23151#[derive(Debug, Clone, PartialEq)]
23152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23154#[cfg_attr(feature = "ts", derive(TS))]
23155#[cfg_attr(feature = "ts", ts(export))]
23156pub struct PARAM_EXT_REQUEST_READ_DATA {
23157    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23158    pub param_index: i16,
23159    #[doc = "System ID"]
23160    pub target_system: u8,
23161    #[doc = "Component ID"]
23162    pub target_component: u8,
23163    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23164    #[cfg_attr(feature = "ts", ts(type = "string"))]
23165    pub param_id: CharArray<16>,
23166}
23167impl PARAM_EXT_REQUEST_READ_DATA {
23168    pub const ENCODED_LEN: usize = 20usize;
23169    pub const DEFAULT: Self = Self {
23170        param_index: 0_i16,
23171        target_system: 0_u8,
23172        target_component: 0_u8,
23173        param_id: CharArray::new([0_u8; 16usize]),
23174    };
23175    #[cfg(feature = "arbitrary")]
23176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23177        use arbitrary::{Arbitrary, Unstructured};
23178        let mut buf = [0u8; 1024];
23179        rng.fill_bytes(&mut buf);
23180        let mut unstructured = Unstructured::new(&buf);
23181        Self::arbitrary(&mut unstructured).unwrap_or_default()
23182    }
23183}
23184impl Default for PARAM_EXT_REQUEST_READ_DATA {
23185    fn default() -> Self {
23186        Self::DEFAULT.clone()
23187    }
23188}
23189impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23190    type Message = MavMessage;
23191    const ID: u32 = 320u32;
23192    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23193    const EXTRA_CRC: u8 = 243u8;
23194    const ENCODED_LEN: usize = 20usize;
23195    fn deser(
23196        _version: MavlinkVersion,
23197        __input: &[u8],
23198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23199        let avail_len = __input.len();
23200        let mut payload_buf = [0; Self::ENCODED_LEN];
23201        let mut buf = if avail_len < Self::ENCODED_LEN {
23202            payload_buf[0..avail_len].copy_from_slice(__input);
23203            Bytes::new(&payload_buf)
23204        } else {
23205            Bytes::new(__input)
23206        };
23207        let mut __struct = Self::default();
23208        __struct.param_index = buf.get_i16_le();
23209        __struct.target_system = buf.get_u8();
23210        __struct.target_component = buf.get_u8();
23211        let mut tmp = [0_u8; 16usize];
23212        for v in &mut tmp {
23213            *v = buf.get_u8();
23214        }
23215        __struct.param_id = CharArray::new(tmp);
23216        Ok(__struct)
23217    }
23218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23219        let mut __tmp = BytesMut::new(bytes);
23220        #[allow(clippy::absurd_extreme_comparisons)]
23221        #[allow(unused_comparisons)]
23222        if __tmp.remaining() < Self::ENCODED_LEN {
23223            panic!(
23224                "buffer is too small (need {} bytes, but got {})",
23225                Self::ENCODED_LEN,
23226                __tmp.remaining(),
23227            )
23228        }
23229        __tmp.put_i16_le(self.param_index);
23230        __tmp.put_u8(self.target_system);
23231        __tmp.put_u8(self.target_component);
23232        for val in &self.param_id {
23233            __tmp.put_u8(*val);
23234        }
23235        if matches!(version, MavlinkVersion::V2) {
23236            let len = __tmp.len();
23237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23238        } else {
23239            __tmp.len()
23240        }
23241    }
23242}
23243#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23244#[doc = ""]
23245#[doc = "ID: 323"]
23246#[derive(Debug, Clone, PartialEq)]
23247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23249#[cfg_attr(feature = "ts", derive(TS))]
23250#[cfg_attr(feature = "ts", ts(export))]
23251pub struct PARAM_EXT_SET_DATA {
23252    #[doc = "System ID"]
23253    pub target_system: u8,
23254    #[doc = "Component ID"]
23255    pub target_component: u8,
23256    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23257    #[cfg_attr(feature = "ts", ts(type = "string"))]
23258    pub param_id: CharArray<16>,
23259    #[doc = "Parameter value"]
23260    #[cfg_attr(feature = "ts", ts(type = "string"))]
23261    pub param_value: CharArray<128>,
23262    #[doc = "Parameter type."]
23263    pub param_type: MavParamExtType,
23264}
23265impl PARAM_EXT_SET_DATA {
23266    pub const ENCODED_LEN: usize = 147usize;
23267    pub const DEFAULT: Self = Self {
23268        target_system: 0_u8,
23269        target_component: 0_u8,
23270        param_id: CharArray::new([0_u8; 16usize]),
23271        param_value: CharArray::new([0_u8; 128usize]),
23272        param_type: MavParamExtType::DEFAULT,
23273    };
23274    #[cfg(feature = "arbitrary")]
23275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23276        use arbitrary::{Arbitrary, Unstructured};
23277        let mut buf = [0u8; 1024];
23278        rng.fill_bytes(&mut buf);
23279        let mut unstructured = Unstructured::new(&buf);
23280        Self::arbitrary(&mut unstructured).unwrap_or_default()
23281    }
23282}
23283impl Default for PARAM_EXT_SET_DATA {
23284    fn default() -> Self {
23285        Self::DEFAULT.clone()
23286    }
23287}
23288impl MessageData for PARAM_EXT_SET_DATA {
23289    type Message = MavMessage;
23290    const ID: u32 = 323u32;
23291    const NAME: &'static str = "PARAM_EXT_SET";
23292    const EXTRA_CRC: u8 = 78u8;
23293    const ENCODED_LEN: usize = 147usize;
23294    fn deser(
23295        _version: MavlinkVersion,
23296        __input: &[u8],
23297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23298        let avail_len = __input.len();
23299        let mut payload_buf = [0; Self::ENCODED_LEN];
23300        let mut buf = if avail_len < Self::ENCODED_LEN {
23301            payload_buf[0..avail_len].copy_from_slice(__input);
23302            Bytes::new(&payload_buf)
23303        } else {
23304            Bytes::new(__input)
23305        };
23306        let mut __struct = Self::default();
23307        __struct.target_system = buf.get_u8();
23308        __struct.target_component = buf.get_u8();
23309        let mut tmp = [0_u8; 16usize];
23310        for v in &mut tmp {
23311            *v = buf.get_u8();
23312        }
23313        __struct.param_id = CharArray::new(tmp);
23314        let mut tmp = [0_u8; 128usize];
23315        for v in &mut tmp {
23316            *v = buf.get_u8();
23317        }
23318        __struct.param_value = CharArray::new(tmp);
23319        let tmp = buf.get_u8();
23320        __struct.param_type =
23321            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23322                enum_type: "MavParamExtType",
23323                value: tmp as u32,
23324            })?;
23325        Ok(__struct)
23326    }
23327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23328        let mut __tmp = BytesMut::new(bytes);
23329        #[allow(clippy::absurd_extreme_comparisons)]
23330        #[allow(unused_comparisons)]
23331        if __tmp.remaining() < Self::ENCODED_LEN {
23332            panic!(
23333                "buffer is too small (need {} bytes, but got {})",
23334                Self::ENCODED_LEN,
23335                __tmp.remaining(),
23336            )
23337        }
23338        __tmp.put_u8(self.target_system);
23339        __tmp.put_u8(self.target_component);
23340        for val in &self.param_id {
23341            __tmp.put_u8(*val);
23342        }
23343        for val in &self.param_value {
23344            __tmp.put_u8(*val);
23345        }
23346        __tmp.put_u8(self.param_type as u8);
23347        if matches!(version, MavlinkVersion::V2) {
23348            let len = __tmp.len();
23349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23350        } else {
23351            __tmp.len()
23352        }
23353    }
23354}
23355#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23356#[doc = ""]
23357#[doc = "ID: 322"]
23358#[derive(Debug, Clone, PartialEq)]
23359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23361#[cfg_attr(feature = "ts", derive(TS))]
23362#[cfg_attr(feature = "ts", ts(export))]
23363pub struct PARAM_EXT_VALUE_DATA {
23364    #[doc = "Total number of parameters"]
23365    pub param_count: u16,
23366    #[doc = "Index of this parameter"]
23367    pub param_index: u16,
23368    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23369    #[cfg_attr(feature = "ts", ts(type = "string"))]
23370    pub param_id: CharArray<16>,
23371    #[doc = "Parameter value"]
23372    #[cfg_attr(feature = "ts", ts(type = "string"))]
23373    pub param_value: CharArray<128>,
23374    #[doc = "Parameter type."]
23375    pub param_type: MavParamExtType,
23376}
23377impl PARAM_EXT_VALUE_DATA {
23378    pub const ENCODED_LEN: usize = 149usize;
23379    pub const DEFAULT: Self = Self {
23380        param_count: 0_u16,
23381        param_index: 0_u16,
23382        param_id: CharArray::new([0_u8; 16usize]),
23383        param_value: CharArray::new([0_u8; 128usize]),
23384        param_type: MavParamExtType::DEFAULT,
23385    };
23386    #[cfg(feature = "arbitrary")]
23387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23388        use arbitrary::{Arbitrary, Unstructured};
23389        let mut buf = [0u8; 1024];
23390        rng.fill_bytes(&mut buf);
23391        let mut unstructured = Unstructured::new(&buf);
23392        Self::arbitrary(&mut unstructured).unwrap_or_default()
23393    }
23394}
23395impl Default for PARAM_EXT_VALUE_DATA {
23396    fn default() -> Self {
23397        Self::DEFAULT.clone()
23398    }
23399}
23400impl MessageData for PARAM_EXT_VALUE_DATA {
23401    type Message = MavMessage;
23402    const ID: u32 = 322u32;
23403    const NAME: &'static str = "PARAM_EXT_VALUE";
23404    const EXTRA_CRC: u8 = 243u8;
23405    const ENCODED_LEN: usize = 149usize;
23406    fn deser(
23407        _version: MavlinkVersion,
23408        __input: &[u8],
23409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23410        let avail_len = __input.len();
23411        let mut payload_buf = [0; Self::ENCODED_LEN];
23412        let mut buf = if avail_len < Self::ENCODED_LEN {
23413            payload_buf[0..avail_len].copy_from_slice(__input);
23414            Bytes::new(&payload_buf)
23415        } else {
23416            Bytes::new(__input)
23417        };
23418        let mut __struct = Self::default();
23419        __struct.param_count = buf.get_u16_le();
23420        __struct.param_index = buf.get_u16_le();
23421        let mut tmp = [0_u8; 16usize];
23422        for v in &mut tmp {
23423            *v = buf.get_u8();
23424        }
23425        __struct.param_id = CharArray::new(tmp);
23426        let mut tmp = [0_u8; 128usize];
23427        for v in &mut tmp {
23428            *v = buf.get_u8();
23429        }
23430        __struct.param_value = CharArray::new(tmp);
23431        let tmp = buf.get_u8();
23432        __struct.param_type =
23433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23434                enum_type: "MavParamExtType",
23435                value: tmp as u32,
23436            })?;
23437        Ok(__struct)
23438    }
23439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23440        let mut __tmp = BytesMut::new(bytes);
23441        #[allow(clippy::absurd_extreme_comparisons)]
23442        #[allow(unused_comparisons)]
23443        if __tmp.remaining() < Self::ENCODED_LEN {
23444            panic!(
23445                "buffer is too small (need {} bytes, but got {})",
23446                Self::ENCODED_LEN,
23447                __tmp.remaining(),
23448            )
23449        }
23450        __tmp.put_u16_le(self.param_count);
23451        __tmp.put_u16_le(self.param_index);
23452        for val in &self.param_id {
23453            __tmp.put_u8(*val);
23454        }
23455        for val in &self.param_value {
23456            __tmp.put_u8(*val);
23457        }
23458        __tmp.put_u8(self.param_type as u8);
23459        if matches!(version, MavlinkVersion::V2) {
23460            let len = __tmp.len();
23461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23462        } else {
23463            __tmp.len()
23464        }
23465    }
23466}
23467#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23468#[doc = ""]
23469#[doc = "ID: 50"]
23470#[derive(Debug, Clone, PartialEq)]
23471#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23473#[cfg_attr(feature = "ts", derive(TS))]
23474#[cfg_attr(feature = "ts", ts(export))]
23475pub struct PARAM_MAP_RC_DATA {
23476    #[doc = "Initial parameter value"]
23477    pub param_value0: f32,
23478    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23479    pub scale: f32,
23480    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23481    pub param_value_min: f32,
23482    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23483    pub param_value_max: f32,
23484    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23485    pub param_index: i16,
23486    #[doc = "System ID"]
23487    pub target_system: u8,
23488    #[doc = "Component ID"]
23489    pub target_component: u8,
23490    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23491    #[cfg_attr(feature = "ts", ts(type = "string"))]
23492    pub param_id: CharArray<16>,
23493    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23494    pub parameter_rc_channel_index: u8,
23495}
23496impl PARAM_MAP_RC_DATA {
23497    pub const ENCODED_LEN: usize = 37usize;
23498    pub const DEFAULT: Self = Self {
23499        param_value0: 0.0_f32,
23500        scale: 0.0_f32,
23501        param_value_min: 0.0_f32,
23502        param_value_max: 0.0_f32,
23503        param_index: 0_i16,
23504        target_system: 0_u8,
23505        target_component: 0_u8,
23506        param_id: CharArray::new([0_u8; 16usize]),
23507        parameter_rc_channel_index: 0_u8,
23508    };
23509    #[cfg(feature = "arbitrary")]
23510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23511        use arbitrary::{Arbitrary, Unstructured};
23512        let mut buf = [0u8; 1024];
23513        rng.fill_bytes(&mut buf);
23514        let mut unstructured = Unstructured::new(&buf);
23515        Self::arbitrary(&mut unstructured).unwrap_or_default()
23516    }
23517}
23518impl Default for PARAM_MAP_RC_DATA {
23519    fn default() -> Self {
23520        Self::DEFAULT.clone()
23521    }
23522}
23523impl MessageData for PARAM_MAP_RC_DATA {
23524    type Message = MavMessage;
23525    const ID: u32 = 50u32;
23526    const NAME: &'static str = "PARAM_MAP_RC";
23527    const EXTRA_CRC: u8 = 78u8;
23528    const ENCODED_LEN: usize = 37usize;
23529    fn deser(
23530        _version: MavlinkVersion,
23531        __input: &[u8],
23532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23533        let avail_len = __input.len();
23534        let mut payload_buf = [0; Self::ENCODED_LEN];
23535        let mut buf = if avail_len < Self::ENCODED_LEN {
23536            payload_buf[0..avail_len].copy_from_slice(__input);
23537            Bytes::new(&payload_buf)
23538        } else {
23539            Bytes::new(__input)
23540        };
23541        let mut __struct = Self::default();
23542        __struct.param_value0 = buf.get_f32_le();
23543        __struct.scale = buf.get_f32_le();
23544        __struct.param_value_min = buf.get_f32_le();
23545        __struct.param_value_max = buf.get_f32_le();
23546        __struct.param_index = buf.get_i16_le();
23547        __struct.target_system = buf.get_u8();
23548        __struct.target_component = buf.get_u8();
23549        let mut tmp = [0_u8; 16usize];
23550        for v in &mut tmp {
23551            *v = buf.get_u8();
23552        }
23553        __struct.param_id = CharArray::new(tmp);
23554        __struct.parameter_rc_channel_index = buf.get_u8();
23555        Ok(__struct)
23556    }
23557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23558        let mut __tmp = BytesMut::new(bytes);
23559        #[allow(clippy::absurd_extreme_comparisons)]
23560        #[allow(unused_comparisons)]
23561        if __tmp.remaining() < Self::ENCODED_LEN {
23562            panic!(
23563                "buffer is too small (need {} bytes, but got {})",
23564                Self::ENCODED_LEN,
23565                __tmp.remaining(),
23566            )
23567        }
23568        __tmp.put_f32_le(self.param_value0);
23569        __tmp.put_f32_le(self.scale);
23570        __tmp.put_f32_le(self.param_value_min);
23571        __tmp.put_f32_le(self.param_value_max);
23572        __tmp.put_i16_le(self.param_index);
23573        __tmp.put_u8(self.target_system);
23574        __tmp.put_u8(self.target_component);
23575        for val in &self.param_id {
23576            __tmp.put_u8(*val);
23577        }
23578        __tmp.put_u8(self.parameter_rc_channel_index);
23579        if matches!(version, MavlinkVersion::V2) {
23580            let len = __tmp.len();
23581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23582        } else {
23583            __tmp.len()
23584        }
23585    }
23586}
23587#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23588#[doc = ""]
23589#[doc = "ID: 21"]
23590#[derive(Debug, Clone, PartialEq)]
23591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23593#[cfg_attr(feature = "ts", derive(TS))]
23594#[cfg_attr(feature = "ts", ts(export))]
23595pub struct PARAM_REQUEST_LIST_DATA {
23596    #[doc = "System ID"]
23597    pub target_system: u8,
23598    #[doc = "Component ID"]
23599    pub target_component: u8,
23600}
23601impl PARAM_REQUEST_LIST_DATA {
23602    pub const ENCODED_LEN: usize = 2usize;
23603    pub const DEFAULT: Self = Self {
23604        target_system: 0_u8,
23605        target_component: 0_u8,
23606    };
23607    #[cfg(feature = "arbitrary")]
23608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23609        use arbitrary::{Arbitrary, Unstructured};
23610        let mut buf = [0u8; 1024];
23611        rng.fill_bytes(&mut buf);
23612        let mut unstructured = Unstructured::new(&buf);
23613        Self::arbitrary(&mut unstructured).unwrap_or_default()
23614    }
23615}
23616impl Default for PARAM_REQUEST_LIST_DATA {
23617    fn default() -> Self {
23618        Self::DEFAULT.clone()
23619    }
23620}
23621impl MessageData for PARAM_REQUEST_LIST_DATA {
23622    type Message = MavMessage;
23623    const ID: u32 = 21u32;
23624    const NAME: &'static str = "PARAM_REQUEST_LIST";
23625    const EXTRA_CRC: u8 = 159u8;
23626    const ENCODED_LEN: usize = 2usize;
23627    fn deser(
23628        _version: MavlinkVersion,
23629        __input: &[u8],
23630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23631        let avail_len = __input.len();
23632        let mut payload_buf = [0; Self::ENCODED_LEN];
23633        let mut buf = if avail_len < Self::ENCODED_LEN {
23634            payload_buf[0..avail_len].copy_from_slice(__input);
23635            Bytes::new(&payload_buf)
23636        } else {
23637            Bytes::new(__input)
23638        };
23639        let mut __struct = Self::default();
23640        __struct.target_system = buf.get_u8();
23641        __struct.target_component = buf.get_u8();
23642        Ok(__struct)
23643    }
23644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23645        let mut __tmp = BytesMut::new(bytes);
23646        #[allow(clippy::absurd_extreme_comparisons)]
23647        #[allow(unused_comparisons)]
23648        if __tmp.remaining() < Self::ENCODED_LEN {
23649            panic!(
23650                "buffer is too small (need {} bytes, but got {})",
23651                Self::ENCODED_LEN,
23652                __tmp.remaining(),
23653            )
23654        }
23655        __tmp.put_u8(self.target_system);
23656        __tmp.put_u8(self.target_component);
23657        if matches!(version, MavlinkVersion::V2) {
23658            let len = __tmp.len();
23659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23660        } else {
23661            __tmp.len()
23662        }
23663    }
23664}
23665#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23666#[doc = ""]
23667#[doc = "ID: 20"]
23668#[derive(Debug, Clone, PartialEq)]
23669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23671#[cfg_attr(feature = "ts", derive(TS))]
23672#[cfg_attr(feature = "ts", ts(export))]
23673pub struct PARAM_REQUEST_READ_DATA {
23674    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23675    pub param_index: i16,
23676    #[doc = "System ID"]
23677    pub target_system: u8,
23678    #[doc = "Component ID"]
23679    pub target_component: u8,
23680    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23681    #[cfg_attr(feature = "ts", ts(type = "string"))]
23682    pub param_id: CharArray<16>,
23683}
23684impl PARAM_REQUEST_READ_DATA {
23685    pub const ENCODED_LEN: usize = 20usize;
23686    pub const DEFAULT: Self = Self {
23687        param_index: 0_i16,
23688        target_system: 0_u8,
23689        target_component: 0_u8,
23690        param_id: CharArray::new([0_u8; 16usize]),
23691    };
23692    #[cfg(feature = "arbitrary")]
23693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23694        use arbitrary::{Arbitrary, Unstructured};
23695        let mut buf = [0u8; 1024];
23696        rng.fill_bytes(&mut buf);
23697        let mut unstructured = Unstructured::new(&buf);
23698        Self::arbitrary(&mut unstructured).unwrap_or_default()
23699    }
23700}
23701impl Default for PARAM_REQUEST_READ_DATA {
23702    fn default() -> Self {
23703        Self::DEFAULT.clone()
23704    }
23705}
23706impl MessageData for PARAM_REQUEST_READ_DATA {
23707    type Message = MavMessage;
23708    const ID: u32 = 20u32;
23709    const NAME: &'static str = "PARAM_REQUEST_READ";
23710    const EXTRA_CRC: u8 = 214u8;
23711    const ENCODED_LEN: usize = 20usize;
23712    fn deser(
23713        _version: MavlinkVersion,
23714        __input: &[u8],
23715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23716        let avail_len = __input.len();
23717        let mut payload_buf = [0; Self::ENCODED_LEN];
23718        let mut buf = if avail_len < Self::ENCODED_LEN {
23719            payload_buf[0..avail_len].copy_from_slice(__input);
23720            Bytes::new(&payload_buf)
23721        } else {
23722            Bytes::new(__input)
23723        };
23724        let mut __struct = Self::default();
23725        __struct.param_index = buf.get_i16_le();
23726        __struct.target_system = buf.get_u8();
23727        __struct.target_component = buf.get_u8();
23728        let mut tmp = [0_u8; 16usize];
23729        for v in &mut tmp {
23730            *v = buf.get_u8();
23731        }
23732        __struct.param_id = CharArray::new(tmp);
23733        Ok(__struct)
23734    }
23735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23736        let mut __tmp = BytesMut::new(bytes);
23737        #[allow(clippy::absurd_extreme_comparisons)]
23738        #[allow(unused_comparisons)]
23739        if __tmp.remaining() < Self::ENCODED_LEN {
23740            panic!(
23741                "buffer is too small (need {} bytes, but got {})",
23742                Self::ENCODED_LEN,
23743                __tmp.remaining(),
23744            )
23745        }
23746        __tmp.put_i16_le(self.param_index);
23747        __tmp.put_u8(self.target_system);
23748        __tmp.put_u8(self.target_component);
23749        for val in &self.param_id {
23750            __tmp.put_u8(*val);
23751        }
23752        if matches!(version, MavlinkVersion::V2) {
23753            let len = __tmp.len();
23754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23755        } else {
23756            __tmp.len()
23757        }
23758    }
23759}
23760#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23761#[doc = ""]
23762#[doc = "ID: 23"]
23763#[derive(Debug, Clone, PartialEq)]
23764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23766#[cfg_attr(feature = "ts", derive(TS))]
23767#[cfg_attr(feature = "ts", ts(export))]
23768pub struct PARAM_SET_DATA {
23769    #[doc = "Onboard parameter value"]
23770    pub param_value: f32,
23771    #[doc = "System ID"]
23772    pub target_system: u8,
23773    #[doc = "Component ID"]
23774    pub target_component: u8,
23775    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23776    #[cfg_attr(feature = "ts", ts(type = "string"))]
23777    pub param_id: CharArray<16>,
23778    #[doc = "Onboard parameter type."]
23779    pub param_type: MavParamType,
23780}
23781impl PARAM_SET_DATA {
23782    pub const ENCODED_LEN: usize = 23usize;
23783    pub const DEFAULT: Self = Self {
23784        param_value: 0.0_f32,
23785        target_system: 0_u8,
23786        target_component: 0_u8,
23787        param_id: CharArray::new([0_u8; 16usize]),
23788        param_type: MavParamType::DEFAULT,
23789    };
23790    #[cfg(feature = "arbitrary")]
23791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23792        use arbitrary::{Arbitrary, Unstructured};
23793        let mut buf = [0u8; 1024];
23794        rng.fill_bytes(&mut buf);
23795        let mut unstructured = Unstructured::new(&buf);
23796        Self::arbitrary(&mut unstructured).unwrap_or_default()
23797    }
23798}
23799impl Default for PARAM_SET_DATA {
23800    fn default() -> Self {
23801        Self::DEFAULT.clone()
23802    }
23803}
23804impl MessageData for PARAM_SET_DATA {
23805    type Message = MavMessage;
23806    const ID: u32 = 23u32;
23807    const NAME: &'static str = "PARAM_SET";
23808    const EXTRA_CRC: u8 = 168u8;
23809    const ENCODED_LEN: usize = 23usize;
23810    fn deser(
23811        _version: MavlinkVersion,
23812        __input: &[u8],
23813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23814        let avail_len = __input.len();
23815        let mut payload_buf = [0; Self::ENCODED_LEN];
23816        let mut buf = if avail_len < Self::ENCODED_LEN {
23817            payload_buf[0..avail_len].copy_from_slice(__input);
23818            Bytes::new(&payload_buf)
23819        } else {
23820            Bytes::new(__input)
23821        };
23822        let mut __struct = Self::default();
23823        __struct.param_value = buf.get_f32_le();
23824        __struct.target_system = buf.get_u8();
23825        __struct.target_component = buf.get_u8();
23826        let mut tmp = [0_u8; 16usize];
23827        for v in &mut tmp {
23828            *v = buf.get_u8();
23829        }
23830        __struct.param_id = CharArray::new(tmp);
23831        let tmp = buf.get_u8();
23832        __struct.param_type =
23833            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23834                enum_type: "MavParamType",
23835                value: tmp as u32,
23836            })?;
23837        Ok(__struct)
23838    }
23839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23840        let mut __tmp = BytesMut::new(bytes);
23841        #[allow(clippy::absurd_extreme_comparisons)]
23842        #[allow(unused_comparisons)]
23843        if __tmp.remaining() < Self::ENCODED_LEN {
23844            panic!(
23845                "buffer is too small (need {} bytes, but got {})",
23846                Self::ENCODED_LEN,
23847                __tmp.remaining(),
23848            )
23849        }
23850        __tmp.put_f32_le(self.param_value);
23851        __tmp.put_u8(self.target_system);
23852        __tmp.put_u8(self.target_component);
23853        for val in &self.param_id {
23854            __tmp.put_u8(*val);
23855        }
23856        __tmp.put_u8(self.param_type as u8);
23857        if matches!(version, MavlinkVersion::V2) {
23858            let len = __tmp.len();
23859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23860        } else {
23861            __tmp.len()
23862        }
23863    }
23864}
23865#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23866#[doc = ""]
23867#[doc = "ID: 22"]
23868#[derive(Debug, Clone, PartialEq)]
23869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23871#[cfg_attr(feature = "ts", derive(TS))]
23872#[cfg_attr(feature = "ts", ts(export))]
23873pub struct PARAM_VALUE_DATA {
23874    #[doc = "Onboard parameter value"]
23875    pub param_value: f32,
23876    #[doc = "Total number of onboard parameters"]
23877    pub param_count: u16,
23878    #[doc = "Index of this onboard parameter"]
23879    pub param_index: u16,
23880    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23881    #[cfg_attr(feature = "ts", ts(type = "string"))]
23882    pub param_id: CharArray<16>,
23883    #[doc = "Onboard parameter type."]
23884    pub param_type: MavParamType,
23885}
23886impl PARAM_VALUE_DATA {
23887    pub const ENCODED_LEN: usize = 25usize;
23888    pub const DEFAULT: Self = Self {
23889        param_value: 0.0_f32,
23890        param_count: 0_u16,
23891        param_index: 0_u16,
23892        param_id: CharArray::new([0_u8; 16usize]),
23893        param_type: MavParamType::DEFAULT,
23894    };
23895    #[cfg(feature = "arbitrary")]
23896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23897        use arbitrary::{Arbitrary, Unstructured};
23898        let mut buf = [0u8; 1024];
23899        rng.fill_bytes(&mut buf);
23900        let mut unstructured = Unstructured::new(&buf);
23901        Self::arbitrary(&mut unstructured).unwrap_or_default()
23902    }
23903}
23904impl Default for PARAM_VALUE_DATA {
23905    fn default() -> Self {
23906        Self::DEFAULT.clone()
23907    }
23908}
23909impl MessageData for PARAM_VALUE_DATA {
23910    type Message = MavMessage;
23911    const ID: u32 = 22u32;
23912    const NAME: &'static str = "PARAM_VALUE";
23913    const EXTRA_CRC: u8 = 220u8;
23914    const ENCODED_LEN: usize = 25usize;
23915    fn deser(
23916        _version: MavlinkVersion,
23917        __input: &[u8],
23918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23919        let avail_len = __input.len();
23920        let mut payload_buf = [0; Self::ENCODED_LEN];
23921        let mut buf = if avail_len < Self::ENCODED_LEN {
23922            payload_buf[0..avail_len].copy_from_slice(__input);
23923            Bytes::new(&payload_buf)
23924        } else {
23925            Bytes::new(__input)
23926        };
23927        let mut __struct = Self::default();
23928        __struct.param_value = buf.get_f32_le();
23929        __struct.param_count = buf.get_u16_le();
23930        __struct.param_index = buf.get_u16_le();
23931        let mut tmp = [0_u8; 16usize];
23932        for v in &mut tmp {
23933            *v = buf.get_u8();
23934        }
23935        __struct.param_id = CharArray::new(tmp);
23936        let tmp = buf.get_u8();
23937        __struct.param_type =
23938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23939                enum_type: "MavParamType",
23940                value: tmp as u32,
23941            })?;
23942        Ok(__struct)
23943    }
23944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23945        let mut __tmp = BytesMut::new(bytes);
23946        #[allow(clippy::absurd_extreme_comparisons)]
23947        #[allow(unused_comparisons)]
23948        if __tmp.remaining() < Self::ENCODED_LEN {
23949            panic!(
23950                "buffer is too small (need {} bytes, but got {})",
23951                Self::ENCODED_LEN,
23952                __tmp.remaining(),
23953            )
23954        }
23955        __tmp.put_f32_le(self.param_value);
23956        __tmp.put_u16_le(self.param_count);
23957        __tmp.put_u16_le(self.param_index);
23958        for val in &self.param_id {
23959            __tmp.put_u8(*val);
23960        }
23961        __tmp.put_u8(self.param_type as u8);
23962        if matches!(version, MavlinkVersion::V2) {
23963            let len = __tmp.len();
23964            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23965        } else {
23966            __tmp.len()
23967        }
23968    }
23969}
23970#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23971#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23972#[doc = ""]
23973#[doc = "ID: 4"]
23974#[derive(Debug, Clone, PartialEq)]
23975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23977#[cfg_attr(feature = "ts", derive(TS))]
23978#[cfg_attr(feature = "ts", ts(export))]
23979pub struct PING_DATA {
23980    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23981    pub time_usec: u64,
23982    #[doc = "PING sequence"]
23983    pub seq: u32,
23984    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23985    pub target_system: u8,
23986    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23987    pub target_component: u8,
23988}
23989impl PING_DATA {
23990    pub const ENCODED_LEN: usize = 14usize;
23991    pub const DEFAULT: Self = Self {
23992        time_usec: 0_u64,
23993        seq: 0_u32,
23994        target_system: 0_u8,
23995        target_component: 0_u8,
23996    };
23997    #[cfg(feature = "arbitrary")]
23998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23999        use arbitrary::{Arbitrary, Unstructured};
24000        let mut buf = [0u8; 1024];
24001        rng.fill_bytes(&mut buf);
24002        let mut unstructured = Unstructured::new(&buf);
24003        Self::arbitrary(&mut unstructured).unwrap_or_default()
24004    }
24005}
24006impl Default for PING_DATA {
24007    fn default() -> Self {
24008        Self::DEFAULT.clone()
24009    }
24010}
24011impl MessageData for PING_DATA {
24012    type Message = MavMessage;
24013    const ID: u32 = 4u32;
24014    const NAME: &'static str = "PING";
24015    const EXTRA_CRC: u8 = 237u8;
24016    const ENCODED_LEN: usize = 14usize;
24017    fn deser(
24018        _version: MavlinkVersion,
24019        __input: &[u8],
24020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24021        let avail_len = __input.len();
24022        let mut payload_buf = [0; Self::ENCODED_LEN];
24023        let mut buf = if avail_len < Self::ENCODED_LEN {
24024            payload_buf[0..avail_len].copy_from_slice(__input);
24025            Bytes::new(&payload_buf)
24026        } else {
24027            Bytes::new(__input)
24028        };
24029        let mut __struct = Self::default();
24030        __struct.time_usec = buf.get_u64_le();
24031        __struct.seq = buf.get_u32_le();
24032        __struct.target_system = buf.get_u8();
24033        __struct.target_component = buf.get_u8();
24034        Ok(__struct)
24035    }
24036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24037        let mut __tmp = BytesMut::new(bytes);
24038        #[allow(clippy::absurd_extreme_comparisons)]
24039        #[allow(unused_comparisons)]
24040        if __tmp.remaining() < Self::ENCODED_LEN {
24041            panic!(
24042                "buffer is too small (need {} bytes, but got {})",
24043                Self::ENCODED_LEN,
24044                __tmp.remaining(),
24045            )
24046        }
24047        __tmp.put_u64_le(self.time_usec);
24048        __tmp.put_u32_le(self.seq);
24049        __tmp.put_u8(self.target_system);
24050        __tmp.put_u8(self.target_component);
24051        if matches!(version, MavlinkVersion::V2) {
24052            let len = __tmp.len();
24053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24054        } else {
24055            __tmp.len()
24056        }
24057    }
24058}
24059#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24060#[doc = "Control vehicle tone generation (buzzer)."]
24061#[doc = ""]
24062#[doc = "ID: 258"]
24063#[derive(Debug, Clone, PartialEq)]
24064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24066#[cfg_attr(feature = "ts", derive(TS))]
24067#[cfg_attr(feature = "ts", ts(export))]
24068pub struct PLAY_TUNE_DATA {
24069    #[doc = "System ID"]
24070    pub target_system: u8,
24071    #[doc = "Component ID"]
24072    pub target_component: u8,
24073    #[doc = "tune in board specific format"]
24074    #[cfg_attr(feature = "ts", ts(type = "string"))]
24075    pub tune: CharArray<30>,
24076    #[doc = "tune extension (appended to tune)"]
24077    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24078    #[cfg_attr(feature = "ts", ts(type = "string"))]
24079    pub tune2: CharArray<200>,
24080}
24081impl PLAY_TUNE_DATA {
24082    pub const ENCODED_LEN: usize = 232usize;
24083    pub const DEFAULT: Self = Self {
24084        target_system: 0_u8,
24085        target_component: 0_u8,
24086        tune: CharArray::new([0_u8; 30usize]),
24087        tune2: CharArray::new([0_u8; 200usize]),
24088    };
24089    #[cfg(feature = "arbitrary")]
24090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24091        use arbitrary::{Arbitrary, Unstructured};
24092        let mut buf = [0u8; 1024];
24093        rng.fill_bytes(&mut buf);
24094        let mut unstructured = Unstructured::new(&buf);
24095        Self::arbitrary(&mut unstructured).unwrap_or_default()
24096    }
24097}
24098impl Default for PLAY_TUNE_DATA {
24099    fn default() -> Self {
24100        Self::DEFAULT.clone()
24101    }
24102}
24103impl MessageData for PLAY_TUNE_DATA {
24104    type Message = MavMessage;
24105    const ID: u32 = 258u32;
24106    const NAME: &'static str = "PLAY_TUNE";
24107    const EXTRA_CRC: u8 = 187u8;
24108    const ENCODED_LEN: usize = 232usize;
24109    fn deser(
24110        _version: MavlinkVersion,
24111        __input: &[u8],
24112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24113        let avail_len = __input.len();
24114        let mut payload_buf = [0; Self::ENCODED_LEN];
24115        let mut buf = if avail_len < Self::ENCODED_LEN {
24116            payload_buf[0..avail_len].copy_from_slice(__input);
24117            Bytes::new(&payload_buf)
24118        } else {
24119            Bytes::new(__input)
24120        };
24121        let mut __struct = Self::default();
24122        __struct.target_system = buf.get_u8();
24123        __struct.target_component = buf.get_u8();
24124        let mut tmp = [0_u8; 30usize];
24125        for v in &mut tmp {
24126            *v = buf.get_u8();
24127        }
24128        __struct.tune = CharArray::new(tmp);
24129        let mut tmp = [0_u8; 200usize];
24130        for v in &mut tmp {
24131            *v = buf.get_u8();
24132        }
24133        __struct.tune2 = CharArray::new(tmp);
24134        Ok(__struct)
24135    }
24136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24137        let mut __tmp = BytesMut::new(bytes);
24138        #[allow(clippy::absurd_extreme_comparisons)]
24139        #[allow(unused_comparisons)]
24140        if __tmp.remaining() < Self::ENCODED_LEN {
24141            panic!(
24142                "buffer is too small (need {} bytes, but got {})",
24143                Self::ENCODED_LEN,
24144                __tmp.remaining(),
24145            )
24146        }
24147        __tmp.put_u8(self.target_system);
24148        __tmp.put_u8(self.target_component);
24149        for val in &self.tune {
24150            __tmp.put_u8(*val);
24151        }
24152        if matches!(version, MavlinkVersion::V2) {
24153            for val in &self.tune2 {
24154                __tmp.put_u8(*val);
24155            }
24156            let len = __tmp.len();
24157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24158        } else {
24159            __tmp.len()
24160        }
24161    }
24162}
24163#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24164#[doc = ""]
24165#[doc = "ID: 400"]
24166#[derive(Debug, Clone, PartialEq)]
24167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24169#[cfg_attr(feature = "ts", derive(TS))]
24170#[cfg_attr(feature = "ts", ts(export))]
24171pub struct PLAY_TUNE_V2_DATA {
24172    #[doc = "Tune format"]
24173    pub format: TuneFormat,
24174    #[doc = "System ID"]
24175    pub target_system: u8,
24176    #[doc = "Component ID"]
24177    pub target_component: u8,
24178    #[doc = "Tune definition as a NULL-terminated string."]
24179    #[cfg_attr(feature = "ts", ts(type = "string"))]
24180    pub tune: CharArray<248>,
24181}
24182impl PLAY_TUNE_V2_DATA {
24183    pub const ENCODED_LEN: usize = 254usize;
24184    pub const DEFAULT: Self = Self {
24185        format: TuneFormat::DEFAULT,
24186        target_system: 0_u8,
24187        target_component: 0_u8,
24188        tune: CharArray::new([0_u8; 248usize]),
24189    };
24190    #[cfg(feature = "arbitrary")]
24191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24192        use arbitrary::{Arbitrary, Unstructured};
24193        let mut buf = [0u8; 1024];
24194        rng.fill_bytes(&mut buf);
24195        let mut unstructured = Unstructured::new(&buf);
24196        Self::arbitrary(&mut unstructured).unwrap_or_default()
24197    }
24198}
24199impl Default for PLAY_TUNE_V2_DATA {
24200    fn default() -> Self {
24201        Self::DEFAULT.clone()
24202    }
24203}
24204impl MessageData for PLAY_TUNE_V2_DATA {
24205    type Message = MavMessage;
24206    const ID: u32 = 400u32;
24207    const NAME: &'static str = "PLAY_TUNE_V2";
24208    const EXTRA_CRC: u8 = 110u8;
24209    const ENCODED_LEN: usize = 254usize;
24210    fn deser(
24211        _version: MavlinkVersion,
24212        __input: &[u8],
24213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24214        let avail_len = __input.len();
24215        let mut payload_buf = [0; Self::ENCODED_LEN];
24216        let mut buf = if avail_len < Self::ENCODED_LEN {
24217            payload_buf[0..avail_len].copy_from_slice(__input);
24218            Bytes::new(&payload_buf)
24219        } else {
24220            Bytes::new(__input)
24221        };
24222        let mut __struct = Self::default();
24223        let tmp = buf.get_u32_le();
24224        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24225            ::mavlink_core::error::ParserError::InvalidEnum {
24226                enum_type: "TuneFormat",
24227                value: tmp as u32,
24228            },
24229        )?;
24230        __struct.target_system = buf.get_u8();
24231        __struct.target_component = buf.get_u8();
24232        let mut tmp = [0_u8; 248usize];
24233        for v in &mut tmp {
24234            *v = buf.get_u8();
24235        }
24236        __struct.tune = CharArray::new(tmp);
24237        Ok(__struct)
24238    }
24239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24240        let mut __tmp = BytesMut::new(bytes);
24241        #[allow(clippy::absurd_extreme_comparisons)]
24242        #[allow(unused_comparisons)]
24243        if __tmp.remaining() < Self::ENCODED_LEN {
24244            panic!(
24245                "buffer is too small (need {} bytes, but got {})",
24246                Self::ENCODED_LEN,
24247                __tmp.remaining(),
24248            )
24249        }
24250        __tmp.put_u32_le(self.format as u32);
24251        __tmp.put_u8(self.target_system);
24252        __tmp.put_u8(self.target_component);
24253        for val in &self.tune {
24254            __tmp.put_u8(*val);
24255        }
24256        if matches!(version, MavlinkVersion::V2) {
24257            let len = __tmp.len();
24258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24259        } else {
24260            __tmp.len()
24261        }
24262    }
24263}
24264#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24265#[doc = ""]
24266#[doc = "ID: 87"]
24267#[derive(Debug, Clone, PartialEq)]
24268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24270#[cfg_attr(feature = "ts", derive(TS))]
24271#[cfg_attr(feature = "ts", ts(export))]
24272pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24273    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24274    pub time_boot_ms: u32,
24275    #[doc = "Latitude in WGS84 frame"]
24276    pub lat_int: i32,
24277    #[doc = "Longitude in WGS84 frame"]
24278    pub lon_int: i32,
24279    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24280    pub alt: f32,
24281    #[doc = "X velocity in NED frame"]
24282    pub vx: f32,
24283    #[doc = "Y velocity in NED frame"]
24284    pub vy: f32,
24285    #[doc = "Z velocity in NED frame"]
24286    pub vz: f32,
24287    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24288    pub afx: f32,
24289    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24290    pub afy: f32,
24291    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24292    pub afz: f32,
24293    #[doc = "yaw setpoint"]
24294    pub yaw: f32,
24295    #[doc = "yaw rate setpoint"]
24296    pub yaw_rate: f32,
24297    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24298    pub type_mask: PositionTargetTypemask,
24299    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24300    pub coordinate_frame: MavFrame,
24301}
24302impl POSITION_TARGET_GLOBAL_INT_DATA {
24303    pub const ENCODED_LEN: usize = 51usize;
24304    pub const DEFAULT: Self = Self {
24305        time_boot_ms: 0_u32,
24306        lat_int: 0_i32,
24307        lon_int: 0_i32,
24308        alt: 0.0_f32,
24309        vx: 0.0_f32,
24310        vy: 0.0_f32,
24311        vz: 0.0_f32,
24312        afx: 0.0_f32,
24313        afy: 0.0_f32,
24314        afz: 0.0_f32,
24315        yaw: 0.0_f32,
24316        yaw_rate: 0.0_f32,
24317        type_mask: PositionTargetTypemask::DEFAULT,
24318        coordinate_frame: MavFrame::DEFAULT,
24319    };
24320    #[cfg(feature = "arbitrary")]
24321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24322        use arbitrary::{Arbitrary, Unstructured};
24323        let mut buf = [0u8; 1024];
24324        rng.fill_bytes(&mut buf);
24325        let mut unstructured = Unstructured::new(&buf);
24326        Self::arbitrary(&mut unstructured).unwrap_or_default()
24327    }
24328}
24329impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24330    fn default() -> Self {
24331        Self::DEFAULT.clone()
24332    }
24333}
24334impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24335    type Message = MavMessage;
24336    const ID: u32 = 87u32;
24337    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24338    const EXTRA_CRC: u8 = 150u8;
24339    const ENCODED_LEN: usize = 51usize;
24340    fn deser(
24341        _version: MavlinkVersion,
24342        __input: &[u8],
24343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24344        let avail_len = __input.len();
24345        let mut payload_buf = [0; Self::ENCODED_LEN];
24346        let mut buf = if avail_len < Self::ENCODED_LEN {
24347            payload_buf[0..avail_len].copy_from_slice(__input);
24348            Bytes::new(&payload_buf)
24349        } else {
24350            Bytes::new(__input)
24351        };
24352        let mut __struct = Self::default();
24353        __struct.time_boot_ms = buf.get_u32_le();
24354        __struct.lat_int = buf.get_i32_le();
24355        __struct.lon_int = buf.get_i32_le();
24356        __struct.alt = buf.get_f32_le();
24357        __struct.vx = buf.get_f32_le();
24358        __struct.vy = buf.get_f32_le();
24359        __struct.vz = buf.get_f32_le();
24360        __struct.afx = buf.get_f32_le();
24361        __struct.afy = buf.get_f32_le();
24362        __struct.afz = buf.get_f32_le();
24363        __struct.yaw = buf.get_f32_le();
24364        __struct.yaw_rate = buf.get_f32_le();
24365        let tmp = buf.get_u16_le();
24366        __struct.type_mask = PositionTargetTypemask::from_bits(
24367            tmp & PositionTargetTypemask::all().bits(),
24368        )
24369        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24370            flag_type: "PositionTargetTypemask",
24371            value: tmp as u32,
24372        })?;
24373        let tmp = buf.get_u8();
24374        __struct.coordinate_frame =
24375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24376                enum_type: "MavFrame",
24377                value: tmp as u32,
24378            })?;
24379        Ok(__struct)
24380    }
24381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24382        let mut __tmp = BytesMut::new(bytes);
24383        #[allow(clippy::absurd_extreme_comparisons)]
24384        #[allow(unused_comparisons)]
24385        if __tmp.remaining() < Self::ENCODED_LEN {
24386            panic!(
24387                "buffer is too small (need {} bytes, but got {})",
24388                Self::ENCODED_LEN,
24389                __tmp.remaining(),
24390            )
24391        }
24392        __tmp.put_u32_le(self.time_boot_ms);
24393        __tmp.put_i32_le(self.lat_int);
24394        __tmp.put_i32_le(self.lon_int);
24395        __tmp.put_f32_le(self.alt);
24396        __tmp.put_f32_le(self.vx);
24397        __tmp.put_f32_le(self.vy);
24398        __tmp.put_f32_le(self.vz);
24399        __tmp.put_f32_le(self.afx);
24400        __tmp.put_f32_le(self.afy);
24401        __tmp.put_f32_le(self.afz);
24402        __tmp.put_f32_le(self.yaw);
24403        __tmp.put_f32_le(self.yaw_rate);
24404        __tmp.put_u16_le(self.type_mask.bits());
24405        __tmp.put_u8(self.coordinate_frame as u8);
24406        if matches!(version, MavlinkVersion::V2) {
24407            let len = __tmp.len();
24408            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24409        } else {
24410            __tmp.len()
24411        }
24412    }
24413}
24414#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24415#[doc = ""]
24416#[doc = "ID: 85"]
24417#[derive(Debug, Clone, PartialEq)]
24418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24420#[cfg_attr(feature = "ts", derive(TS))]
24421#[cfg_attr(feature = "ts", ts(export))]
24422pub struct POSITION_TARGET_LOCAL_NED_DATA {
24423    #[doc = "Timestamp (time since system boot)."]
24424    pub time_boot_ms: u32,
24425    #[doc = "X Position in NED frame"]
24426    pub x: f32,
24427    #[doc = "Y Position in NED frame"]
24428    pub y: f32,
24429    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24430    pub z: f32,
24431    #[doc = "X velocity in NED frame"]
24432    pub vx: f32,
24433    #[doc = "Y velocity in NED frame"]
24434    pub vy: f32,
24435    #[doc = "Z velocity in NED frame"]
24436    pub vz: f32,
24437    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24438    pub afx: f32,
24439    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24440    pub afy: f32,
24441    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24442    pub afz: f32,
24443    #[doc = "yaw setpoint"]
24444    pub yaw: f32,
24445    #[doc = "yaw rate setpoint"]
24446    pub yaw_rate: f32,
24447    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24448    pub type_mask: PositionTargetTypemask,
24449    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24450    pub coordinate_frame: MavFrame,
24451}
24452impl POSITION_TARGET_LOCAL_NED_DATA {
24453    pub const ENCODED_LEN: usize = 51usize;
24454    pub const DEFAULT: Self = Self {
24455        time_boot_ms: 0_u32,
24456        x: 0.0_f32,
24457        y: 0.0_f32,
24458        z: 0.0_f32,
24459        vx: 0.0_f32,
24460        vy: 0.0_f32,
24461        vz: 0.0_f32,
24462        afx: 0.0_f32,
24463        afy: 0.0_f32,
24464        afz: 0.0_f32,
24465        yaw: 0.0_f32,
24466        yaw_rate: 0.0_f32,
24467        type_mask: PositionTargetTypemask::DEFAULT,
24468        coordinate_frame: MavFrame::DEFAULT,
24469    };
24470    #[cfg(feature = "arbitrary")]
24471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24472        use arbitrary::{Arbitrary, Unstructured};
24473        let mut buf = [0u8; 1024];
24474        rng.fill_bytes(&mut buf);
24475        let mut unstructured = Unstructured::new(&buf);
24476        Self::arbitrary(&mut unstructured).unwrap_or_default()
24477    }
24478}
24479impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24480    fn default() -> Self {
24481        Self::DEFAULT.clone()
24482    }
24483}
24484impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24485    type Message = MavMessage;
24486    const ID: u32 = 85u32;
24487    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24488    const EXTRA_CRC: u8 = 140u8;
24489    const ENCODED_LEN: usize = 51usize;
24490    fn deser(
24491        _version: MavlinkVersion,
24492        __input: &[u8],
24493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24494        let avail_len = __input.len();
24495        let mut payload_buf = [0; Self::ENCODED_LEN];
24496        let mut buf = if avail_len < Self::ENCODED_LEN {
24497            payload_buf[0..avail_len].copy_from_slice(__input);
24498            Bytes::new(&payload_buf)
24499        } else {
24500            Bytes::new(__input)
24501        };
24502        let mut __struct = Self::default();
24503        __struct.time_boot_ms = buf.get_u32_le();
24504        __struct.x = buf.get_f32_le();
24505        __struct.y = buf.get_f32_le();
24506        __struct.z = buf.get_f32_le();
24507        __struct.vx = buf.get_f32_le();
24508        __struct.vy = buf.get_f32_le();
24509        __struct.vz = buf.get_f32_le();
24510        __struct.afx = buf.get_f32_le();
24511        __struct.afy = buf.get_f32_le();
24512        __struct.afz = buf.get_f32_le();
24513        __struct.yaw = buf.get_f32_le();
24514        __struct.yaw_rate = buf.get_f32_le();
24515        let tmp = buf.get_u16_le();
24516        __struct.type_mask = PositionTargetTypemask::from_bits(
24517            tmp & PositionTargetTypemask::all().bits(),
24518        )
24519        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24520            flag_type: "PositionTargetTypemask",
24521            value: tmp as u32,
24522        })?;
24523        let tmp = buf.get_u8();
24524        __struct.coordinate_frame =
24525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24526                enum_type: "MavFrame",
24527                value: tmp as u32,
24528            })?;
24529        Ok(__struct)
24530    }
24531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24532        let mut __tmp = BytesMut::new(bytes);
24533        #[allow(clippy::absurd_extreme_comparisons)]
24534        #[allow(unused_comparisons)]
24535        if __tmp.remaining() < Self::ENCODED_LEN {
24536            panic!(
24537                "buffer is too small (need {} bytes, but got {})",
24538                Self::ENCODED_LEN,
24539                __tmp.remaining(),
24540            )
24541        }
24542        __tmp.put_u32_le(self.time_boot_ms);
24543        __tmp.put_f32_le(self.x);
24544        __tmp.put_f32_le(self.y);
24545        __tmp.put_f32_le(self.z);
24546        __tmp.put_f32_le(self.vx);
24547        __tmp.put_f32_le(self.vy);
24548        __tmp.put_f32_le(self.vz);
24549        __tmp.put_f32_le(self.afx);
24550        __tmp.put_f32_le(self.afy);
24551        __tmp.put_f32_le(self.afz);
24552        __tmp.put_f32_le(self.yaw);
24553        __tmp.put_f32_le(self.yaw_rate);
24554        __tmp.put_u16_le(self.type_mask.bits());
24555        __tmp.put_u8(self.coordinate_frame as u8);
24556        if matches!(version, MavlinkVersion::V2) {
24557            let len = __tmp.len();
24558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24559        } else {
24560            __tmp.len()
24561        }
24562    }
24563}
24564#[doc = "Power supply status."]
24565#[doc = ""]
24566#[doc = "ID: 125"]
24567#[derive(Debug, Clone, PartialEq)]
24568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24570#[cfg_attr(feature = "ts", derive(TS))]
24571#[cfg_attr(feature = "ts", ts(export))]
24572pub struct POWER_STATUS_DATA {
24573    #[doc = "5V rail voltage."]
24574    pub Vcc: u16,
24575    #[doc = "Servo rail voltage."]
24576    pub Vservo: u16,
24577    #[doc = "Bitmap of power supply status flags."]
24578    pub flags: MavPowerStatus,
24579}
24580impl POWER_STATUS_DATA {
24581    pub const ENCODED_LEN: usize = 6usize;
24582    pub const DEFAULT: Self = Self {
24583        Vcc: 0_u16,
24584        Vservo: 0_u16,
24585        flags: MavPowerStatus::DEFAULT,
24586    };
24587    #[cfg(feature = "arbitrary")]
24588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24589        use arbitrary::{Arbitrary, Unstructured};
24590        let mut buf = [0u8; 1024];
24591        rng.fill_bytes(&mut buf);
24592        let mut unstructured = Unstructured::new(&buf);
24593        Self::arbitrary(&mut unstructured).unwrap_or_default()
24594    }
24595}
24596impl Default for POWER_STATUS_DATA {
24597    fn default() -> Self {
24598        Self::DEFAULT.clone()
24599    }
24600}
24601impl MessageData for POWER_STATUS_DATA {
24602    type Message = MavMessage;
24603    const ID: u32 = 125u32;
24604    const NAME: &'static str = "POWER_STATUS";
24605    const EXTRA_CRC: u8 = 203u8;
24606    const ENCODED_LEN: usize = 6usize;
24607    fn deser(
24608        _version: MavlinkVersion,
24609        __input: &[u8],
24610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24611        let avail_len = __input.len();
24612        let mut payload_buf = [0; Self::ENCODED_LEN];
24613        let mut buf = if avail_len < Self::ENCODED_LEN {
24614            payload_buf[0..avail_len].copy_from_slice(__input);
24615            Bytes::new(&payload_buf)
24616        } else {
24617            Bytes::new(__input)
24618        };
24619        let mut __struct = Self::default();
24620        __struct.Vcc = buf.get_u16_le();
24621        __struct.Vservo = buf.get_u16_le();
24622        let tmp = buf.get_u16_le();
24623        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24624            ::mavlink_core::error::ParserError::InvalidFlag {
24625                flag_type: "MavPowerStatus",
24626                value: tmp as u32,
24627            },
24628        )?;
24629        Ok(__struct)
24630    }
24631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24632        let mut __tmp = BytesMut::new(bytes);
24633        #[allow(clippy::absurd_extreme_comparisons)]
24634        #[allow(unused_comparisons)]
24635        if __tmp.remaining() < Self::ENCODED_LEN {
24636            panic!(
24637                "buffer is too small (need {} bytes, but got {})",
24638                Self::ENCODED_LEN,
24639                __tmp.remaining(),
24640            )
24641        }
24642        __tmp.put_u16_le(self.Vcc);
24643        __tmp.put_u16_le(self.Vservo);
24644        __tmp.put_u16_le(self.flags.bits());
24645        if matches!(version, MavlinkVersion::V2) {
24646            let len = __tmp.len();
24647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24648        } else {
24649            __tmp.len()
24650        }
24651    }
24652}
24653#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24654#[doc = ""]
24655#[doc = "ID: 300"]
24656#[derive(Debug, Clone, PartialEq)]
24657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24659#[cfg_attr(feature = "ts", derive(TS))]
24660#[cfg_attr(feature = "ts", ts(export))]
24661pub struct PROTOCOL_VERSION_DATA {
24662    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24663    pub version: u16,
24664    #[doc = "Minimum MAVLink version supported"]
24665    pub min_version: u16,
24666    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24667    pub max_version: u16,
24668    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24670    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24671    pub spec_version_hash: [u8; 8],
24672    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24675    pub library_version_hash: [u8; 8],
24676}
24677impl PROTOCOL_VERSION_DATA {
24678    pub const ENCODED_LEN: usize = 22usize;
24679    pub const DEFAULT: Self = Self {
24680        version: 0_u16,
24681        min_version: 0_u16,
24682        max_version: 0_u16,
24683        spec_version_hash: [0_u8; 8usize],
24684        library_version_hash: [0_u8; 8usize],
24685    };
24686    #[cfg(feature = "arbitrary")]
24687    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24688        use arbitrary::{Arbitrary, Unstructured};
24689        let mut buf = [0u8; 1024];
24690        rng.fill_bytes(&mut buf);
24691        let mut unstructured = Unstructured::new(&buf);
24692        Self::arbitrary(&mut unstructured).unwrap_or_default()
24693    }
24694}
24695impl Default for PROTOCOL_VERSION_DATA {
24696    fn default() -> Self {
24697        Self::DEFAULT.clone()
24698    }
24699}
24700impl MessageData for PROTOCOL_VERSION_DATA {
24701    type Message = MavMessage;
24702    const ID: u32 = 300u32;
24703    const NAME: &'static str = "PROTOCOL_VERSION";
24704    const EXTRA_CRC: u8 = 217u8;
24705    const ENCODED_LEN: usize = 22usize;
24706    fn deser(
24707        _version: MavlinkVersion,
24708        __input: &[u8],
24709    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24710        let avail_len = __input.len();
24711        let mut payload_buf = [0; Self::ENCODED_LEN];
24712        let mut buf = if avail_len < Self::ENCODED_LEN {
24713            payload_buf[0..avail_len].copy_from_slice(__input);
24714            Bytes::new(&payload_buf)
24715        } else {
24716            Bytes::new(__input)
24717        };
24718        let mut __struct = Self::default();
24719        __struct.version = buf.get_u16_le();
24720        __struct.min_version = buf.get_u16_le();
24721        __struct.max_version = buf.get_u16_le();
24722        for v in &mut __struct.spec_version_hash {
24723            let val = buf.get_u8();
24724            *v = val;
24725        }
24726        for v in &mut __struct.library_version_hash {
24727            let val = buf.get_u8();
24728            *v = val;
24729        }
24730        Ok(__struct)
24731    }
24732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24733        let mut __tmp = BytesMut::new(bytes);
24734        #[allow(clippy::absurd_extreme_comparisons)]
24735        #[allow(unused_comparisons)]
24736        if __tmp.remaining() < Self::ENCODED_LEN {
24737            panic!(
24738                "buffer is too small (need {} bytes, but got {})",
24739                Self::ENCODED_LEN,
24740                __tmp.remaining(),
24741            )
24742        }
24743        __tmp.put_u16_le(self.version);
24744        __tmp.put_u16_le(self.min_version);
24745        __tmp.put_u16_le(self.max_version);
24746        for val in &self.spec_version_hash {
24747            __tmp.put_u8(*val);
24748        }
24749        for val in &self.library_version_hash {
24750            __tmp.put_u8(*val);
24751        }
24752        if matches!(version, MavlinkVersion::V2) {
24753            let len = __tmp.len();
24754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24755        } else {
24756            __tmp.len()
24757        }
24758    }
24759}
24760#[doc = "Status generated by radio and injected into MAVLink stream."]
24761#[doc = ""]
24762#[doc = "ID: 109"]
24763#[derive(Debug, Clone, PartialEq)]
24764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24766#[cfg_attr(feature = "ts", derive(TS))]
24767#[cfg_attr(feature = "ts", ts(export))]
24768pub struct RADIO_STATUS_DATA {
24769    #[doc = "Count of radio packet receive errors (since boot)."]
24770    pub rxerrors: u16,
24771    #[doc = "Count of error corrected radio packets (since boot)."]
24772    pub fixed: u16,
24773    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24774    pub rssi: u8,
24775    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24776    pub remrssi: u8,
24777    #[doc = "Remaining free transmitter buffer space."]
24778    pub txbuf: u8,
24779    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24780    pub noise: u8,
24781    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24782    pub remnoise: u8,
24783}
24784impl RADIO_STATUS_DATA {
24785    pub const ENCODED_LEN: usize = 9usize;
24786    pub const DEFAULT: Self = Self {
24787        rxerrors: 0_u16,
24788        fixed: 0_u16,
24789        rssi: 0_u8,
24790        remrssi: 0_u8,
24791        txbuf: 0_u8,
24792        noise: 0_u8,
24793        remnoise: 0_u8,
24794    };
24795    #[cfg(feature = "arbitrary")]
24796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24797        use arbitrary::{Arbitrary, Unstructured};
24798        let mut buf = [0u8; 1024];
24799        rng.fill_bytes(&mut buf);
24800        let mut unstructured = Unstructured::new(&buf);
24801        Self::arbitrary(&mut unstructured).unwrap_or_default()
24802    }
24803}
24804impl Default for RADIO_STATUS_DATA {
24805    fn default() -> Self {
24806        Self::DEFAULT.clone()
24807    }
24808}
24809impl MessageData for RADIO_STATUS_DATA {
24810    type Message = MavMessage;
24811    const ID: u32 = 109u32;
24812    const NAME: &'static str = "RADIO_STATUS";
24813    const EXTRA_CRC: u8 = 185u8;
24814    const ENCODED_LEN: usize = 9usize;
24815    fn deser(
24816        _version: MavlinkVersion,
24817        __input: &[u8],
24818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24819        let avail_len = __input.len();
24820        let mut payload_buf = [0; Self::ENCODED_LEN];
24821        let mut buf = if avail_len < Self::ENCODED_LEN {
24822            payload_buf[0..avail_len].copy_from_slice(__input);
24823            Bytes::new(&payload_buf)
24824        } else {
24825            Bytes::new(__input)
24826        };
24827        let mut __struct = Self::default();
24828        __struct.rxerrors = buf.get_u16_le();
24829        __struct.fixed = buf.get_u16_le();
24830        __struct.rssi = buf.get_u8();
24831        __struct.remrssi = buf.get_u8();
24832        __struct.txbuf = buf.get_u8();
24833        __struct.noise = buf.get_u8();
24834        __struct.remnoise = buf.get_u8();
24835        Ok(__struct)
24836    }
24837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24838        let mut __tmp = BytesMut::new(bytes);
24839        #[allow(clippy::absurd_extreme_comparisons)]
24840        #[allow(unused_comparisons)]
24841        if __tmp.remaining() < Self::ENCODED_LEN {
24842            panic!(
24843                "buffer is too small (need {} bytes, but got {})",
24844                Self::ENCODED_LEN,
24845                __tmp.remaining(),
24846            )
24847        }
24848        __tmp.put_u16_le(self.rxerrors);
24849        __tmp.put_u16_le(self.fixed);
24850        __tmp.put_u8(self.rssi);
24851        __tmp.put_u8(self.remrssi);
24852        __tmp.put_u8(self.txbuf);
24853        __tmp.put_u8(self.noise);
24854        __tmp.put_u8(self.remnoise);
24855        if matches!(version, MavlinkVersion::V2) {
24856            let len = __tmp.len();
24857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24858        } else {
24859            __tmp.len()
24860        }
24861    }
24862}
24863#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24864#[doc = ""]
24865#[doc = "ID: 27"]
24866#[derive(Debug, Clone, PartialEq)]
24867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24869#[cfg_attr(feature = "ts", derive(TS))]
24870#[cfg_attr(feature = "ts", ts(export))]
24871pub struct RAW_IMU_DATA {
24872    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24873    pub time_usec: u64,
24874    #[doc = "X acceleration (raw)"]
24875    pub xacc: i16,
24876    #[doc = "Y acceleration (raw)"]
24877    pub yacc: i16,
24878    #[doc = "Z acceleration (raw)"]
24879    pub zacc: i16,
24880    #[doc = "Angular speed around X axis (raw)"]
24881    pub xgyro: i16,
24882    #[doc = "Angular speed around Y axis (raw)"]
24883    pub ygyro: i16,
24884    #[doc = "Angular speed around Z axis (raw)"]
24885    pub zgyro: i16,
24886    #[doc = "X Magnetic field (raw)"]
24887    pub xmag: i16,
24888    #[doc = "Y Magnetic field (raw)"]
24889    pub ymag: i16,
24890    #[doc = "Z Magnetic field (raw)"]
24891    pub zmag: i16,
24892    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24894    pub id: u8,
24895    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24897    pub temperature: i16,
24898}
24899impl RAW_IMU_DATA {
24900    pub const ENCODED_LEN: usize = 29usize;
24901    pub const DEFAULT: Self = Self {
24902        time_usec: 0_u64,
24903        xacc: 0_i16,
24904        yacc: 0_i16,
24905        zacc: 0_i16,
24906        xgyro: 0_i16,
24907        ygyro: 0_i16,
24908        zgyro: 0_i16,
24909        xmag: 0_i16,
24910        ymag: 0_i16,
24911        zmag: 0_i16,
24912        id: 0_u8,
24913        temperature: 0_i16,
24914    };
24915    #[cfg(feature = "arbitrary")]
24916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24917        use arbitrary::{Arbitrary, Unstructured};
24918        let mut buf = [0u8; 1024];
24919        rng.fill_bytes(&mut buf);
24920        let mut unstructured = Unstructured::new(&buf);
24921        Self::arbitrary(&mut unstructured).unwrap_or_default()
24922    }
24923}
24924impl Default for RAW_IMU_DATA {
24925    fn default() -> Self {
24926        Self::DEFAULT.clone()
24927    }
24928}
24929impl MessageData for RAW_IMU_DATA {
24930    type Message = MavMessage;
24931    const ID: u32 = 27u32;
24932    const NAME: &'static str = "RAW_IMU";
24933    const EXTRA_CRC: u8 = 144u8;
24934    const ENCODED_LEN: usize = 29usize;
24935    fn deser(
24936        _version: MavlinkVersion,
24937        __input: &[u8],
24938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24939        let avail_len = __input.len();
24940        let mut payload_buf = [0; Self::ENCODED_LEN];
24941        let mut buf = if avail_len < Self::ENCODED_LEN {
24942            payload_buf[0..avail_len].copy_from_slice(__input);
24943            Bytes::new(&payload_buf)
24944        } else {
24945            Bytes::new(__input)
24946        };
24947        let mut __struct = Self::default();
24948        __struct.time_usec = buf.get_u64_le();
24949        __struct.xacc = buf.get_i16_le();
24950        __struct.yacc = buf.get_i16_le();
24951        __struct.zacc = buf.get_i16_le();
24952        __struct.xgyro = buf.get_i16_le();
24953        __struct.ygyro = buf.get_i16_le();
24954        __struct.zgyro = buf.get_i16_le();
24955        __struct.xmag = buf.get_i16_le();
24956        __struct.ymag = buf.get_i16_le();
24957        __struct.zmag = buf.get_i16_le();
24958        __struct.id = buf.get_u8();
24959        __struct.temperature = buf.get_i16_le();
24960        Ok(__struct)
24961    }
24962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24963        let mut __tmp = BytesMut::new(bytes);
24964        #[allow(clippy::absurd_extreme_comparisons)]
24965        #[allow(unused_comparisons)]
24966        if __tmp.remaining() < Self::ENCODED_LEN {
24967            panic!(
24968                "buffer is too small (need {} bytes, but got {})",
24969                Self::ENCODED_LEN,
24970                __tmp.remaining(),
24971            )
24972        }
24973        __tmp.put_u64_le(self.time_usec);
24974        __tmp.put_i16_le(self.xacc);
24975        __tmp.put_i16_le(self.yacc);
24976        __tmp.put_i16_le(self.zacc);
24977        __tmp.put_i16_le(self.xgyro);
24978        __tmp.put_i16_le(self.ygyro);
24979        __tmp.put_i16_le(self.zgyro);
24980        __tmp.put_i16_le(self.xmag);
24981        __tmp.put_i16_le(self.ymag);
24982        __tmp.put_i16_le(self.zmag);
24983        if matches!(version, MavlinkVersion::V2) {
24984            __tmp.put_u8(self.id);
24985            __tmp.put_i16_le(self.temperature);
24986            let len = __tmp.len();
24987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24988        } else {
24989            __tmp.len()
24990        }
24991    }
24992}
24993#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24994#[doc = ""]
24995#[doc = "ID: 28"]
24996#[derive(Debug, Clone, PartialEq)]
24997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24999#[cfg_attr(feature = "ts", derive(TS))]
25000#[cfg_attr(feature = "ts", ts(export))]
25001pub struct RAW_PRESSURE_DATA {
25002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25003    pub time_usec: u64,
25004    #[doc = "Absolute pressure (raw)"]
25005    pub press_abs: i16,
25006    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25007    pub press_diff1: i16,
25008    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25009    pub press_diff2: i16,
25010    #[doc = "Raw Temperature measurement (raw)"]
25011    pub temperature: i16,
25012}
25013impl RAW_PRESSURE_DATA {
25014    pub const ENCODED_LEN: usize = 16usize;
25015    pub const DEFAULT: Self = Self {
25016        time_usec: 0_u64,
25017        press_abs: 0_i16,
25018        press_diff1: 0_i16,
25019        press_diff2: 0_i16,
25020        temperature: 0_i16,
25021    };
25022    #[cfg(feature = "arbitrary")]
25023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25024        use arbitrary::{Arbitrary, Unstructured};
25025        let mut buf = [0u8; 1024];
25026        rng.fill_bytes(&mut buf);
25027        let mut unstructured = Unstructured::new(&buf);
25028        Self::arbitrary(&mut unstructured).unwrap_or_default()
25029    }
25030}
25031impl Default for RAW_PRESSURE_DATA {
25032    fn default() -> Self {
25033        Self::DEFAULT.clone()
25034    }
25035}
25036impl MessageData for RAW_PRESSURE_DATA {
25037    type Message = MavMessage;
25038    const ID: u32 = 28u32;
25039    const NAME: &'static str = "RAW_PRESSURE";
25040    const EXTRA_CRC: u8 = 67u8;
25041    const ENCODED_LEN: usize = 16usize;
25042    fn deser(
25043        _version: MavlinkVersion,
25044        __input: &[u8],
25045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25046        let avail_len = __input.len();
25047        let mut payload_buf = [0; Self::ENCODED_LEN];
25048        let mut buf = if avail_len < Self::ENCODED_LEN {
25049            payload_buf[0..avail_len].copy_from_slice(__input);
25050            Bytes::new(&payload_buf)
25051        } else {
25052            Bytes::new(__input)
25053        };
25054        let mut __struct = Self::default();
25055        __struct.time_usec = buf.get_u64_le();
25056        __struct.press_abs = buf.get_i16_le();
25057        __struct.press_diff1 = buf.get_i16_le();
25058        __struct.press_diff2 = buf.get_i16_le();
25059        __struct.temperature = buf.get_i16_le();
25060        Ok(__struct)
25061    }
25062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25063        let mut __tmp = BytesMut::new(bytes);
25064        #[allow(clippy::absurd_extreme_comparisons)]
25065        #[allow(unused_comparisons)]
25066        if __tmp.remaining() < Self::ENCODED_LEN {
25067            panic!(
25068                "buffer is too small (need {} bytes, but got {})",
25069                Self::ENCODED_LEN,
25070                __tmp.remaining(),
25071            )
25072        }
25073        __tmp.put_u64_le(self.time_usec);
25074        __tmp.put_i16_le(self.press_abs);
25075        __tmp.put_i16_le(self.press_diff1);
25076        __tmp.put_i16_le(self.press_diff2);
25077        __tmp.put_i16_le(self.temperature);
25078        if matches!(version, MavlinkVersion::V2) {
25079            let len = __tmp.len();
25080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25081        } else {
25082            __tmp.len()
25083        }
25084    }
25085}
25086#[doc = "RPM sensor data message."]
25087#[doc = ""]
25088#[doc = "ID: 339"]
25089#[derive(Debug, Clone, PartialEq)]
25090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25092#[cfg_attr(feature = "ts", derive(TS))]
25093#[cfg_attr(feature = "ts", ts(export))]
25094pub struct RAW_RPM_DATA {
25095    #[doc = "Indicated rate"]
25096    pub frequency: f32,
25097    #[doc = "Index of this RPM sensor (0-indexed)"]
25098    pub index: u8,
25099}
25100impl RAW_RPM_DATA {
25101    pub const ENCODED_LEN: usize = 5usize;
25102    pub const DEFAULT: Self = Self {
25103        frequency: 0.0_f32,
25104        index: 0_u8,
25105    };
25106    #[cfg(feature = "arbitrary")]
25107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25108        use arbitrary::{Arbitrary, Unstructured};
25109        let mut buf = [0u8; 1024];
25110        rng.fill_bytes(&mut buf);
25111        let mut unstructured = Unstructured::new(&buf);
25112        Self::arbitrary(&mut unstructured).unwrap_or_default()
25113    }
25114}
25115impl Default for RAW_RPM_DATA {
25116    fn default() -> Self {
25117        Self::DEFAULT.clone()
25118    }
25119}
25120impl MessageData for RAW_RPM_DATA {
25121    type Message = MavMessage;
25122    const ID: u32 = 339u32;
25123    const NAME: &'static str = "RAW_RPM";
25124    const EXTRA_CRC: u8 = 199u8;
25125    const ENCODED_LEN: usize = 5usize;
25126    fn deser(
25127        _version: MavlinkVersion,
25128        __input: &[u8],
25129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25130        let avail_len = __input.len();
25131        let mut payload_buf = [0; Self::ENCODED_LEN];
25132        let mut buf = if avail_len < Self::ENCODED_LEN {
25133            payload_buf[0..avail_len].copy_from_slice(__input);
25134            Bytes::new(&payload_buf)
25135        } else {
25136            Bytes::new(__input)
25137        };
25138        let mut __struct = Self::default();
25139        __struct.frequency = buf.get_f32_le();
25140        __struct.index = buf.get_u8();
25141        Ok(__struct)
25142    }
25143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25144        let mut __tmp = BytesMut::new(bytes);
25145        #[allow(clippy::absurd_extreme_comparisons)]
25146        #[allow(unused_comparisons)]
25147        if __tmp.remaining() < Self::ENCODED_LEN {
25148            panic!(
25149                "buffer is too small (need {} bytes, but got {})",
25150                Self::ENCODED_LEN,
25151                __tmp.remaining(),
25152            )
25153        }
25154        __tmp.put_f32_le(self.frequency);
25155        __tmp.put_u8(self.index);
25156        if matches!(version, MavlinkVersion::V2) {
25157            let len = __tmp.len();
25158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25159        } else {
25160            __tmp.len()
25161        }
25162    }
25163}
25164#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25165#[doc = ""]
25166#[doc = "ID: 65"]
25167#[derive(Debug, Clone, PartialEq)]
25168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25170#[cfg_attr(feature = "ts", derive(TS))]
25171#[cfg_attr(feature = "ts", ts(export))]
25172pub struct RC_CHANNELS_DATA {
25173    #[doc = "Timestamp (time since system boot)."]
25174    pub time_boot_ms: u32,
25175    #[doc = "RC channel 1 value."]
25176    pub chan1_raw: u16,
25177    #[doc = "RC channel 2 value."]
25178    pub chan2_raw: u16,
25179    #[doc = "RC channel 3 value."]
25180    pub chan3_raw: u16,
25181    #[doc = "RC channel 4 value."]
25182    pub chan4_raw: u16,
25183    #[doc = "RC channel 5 value."]
25184    pub chan5_raw: u16,
25185    #[doc = "RC channel 6 value."]
25186    pub chan6_raw: u16,
25187    #[doc = "RC channel 7 value."]
25188    pub chan7_raw: u16,
25189    #[doc = "RC channel 8 value."]
25190    pub chan8_raw: u16,
25191    #[doc = "RC channel 9 value."]
25192    pub chan9_raw: u16,
25193    #[doc = "RC channel 10 value."]
25194    pub chan10_raw: u16,
25195    #[doc = "RC channel 11 value."]
25196    pub chan11_raw: u16,
25197    #[doc = "RC channel 12 value."]
25198    pub chan12_raw: u16,
25199    #[doc = "RC channel 13 value."]
25200    pub chan13_raw: u16,
25201    #[doc = "RC channel 14 value."]
25202    pub chan14_raw: u16,
25203    #[doc = "RC channel 15 value."]
25204    pub chan15_raw: u16,
25205    #[doc = "RC channel 16 value."]
25206    pub chan16_raw: u16,
25207    #[doc = "RC channel 17 value."]
25208    pub chan17_raw: u16,
25209    #[doc = "RC channel 18 value."]
25210    pub chan18_raw: u16,
25211    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25212    pub chancount: u8,
25213    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25214    pub rssi: u8,
25215}
25216impl RC_CHANNELS_DATA {
25217    pub const ENCODED_LEN: usize = 42usize;
25218    pub const DEFAULT: Self = Self {
25219        time_boot_ms: 0_u32,
25220        chan1_raw: 0_u16,
25221        chan2_raw: 0_u16,
25222        chan3_raw: 0_u16,
25223        chan4_raw: 0_u16,
25224        chan5_raw: 0_u16,
25225        chan6_raw: 0_u16,
25226        chan7_raw: 0_u16,
25227        chan8_raw: 0_u16,
25228        chan9_raw: 0_u16,
25229        chan10_raw: 0_u16,
25230        chan11_raw: 0_u16,
25231        chan12_raw: 0_u16,
25232        chan13_raw: 0_u16,
25233        chan14_raw: 0_u16,
25234        chan15_raw: 0_u16,
25235        chan16_raw: 0_u16,
25236        chan17_raw: 0_u16,
25237        chan18_raw: 0_u16,
25238        chancount: 0_u8,
25239        rssi: 0_u8,
25240    };
25241    #[cfg(feature = "arbitrary")]
25242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25243        use arbitrary::{Arbitrary, Unstructured};
25244        let mut buf = [0u8; 1024];
25245        rng.fill_bytes(&mut buf);
25246        let mut unstructured = Unstructured::new(&buf);
25247        Self::arbitrary(&mut unstructured).unwrap_or_default()
25248    }
25249}
25250impl Default for RC_CHANNELS_DATA {
25251    fn default() -> Self {
25252        Self::DEFAULT.clone()
25253    }
25254}
25255impl MessageData for RC_CHANNELS_DATA {
25256    type Message = MavMessage;
25257    const ID: u32 = 65u32;
25258    const NAME: &'static str = "RC_CHANNELS";
25259    const EXTRA_CRC: u8 = 118u8;
25260    const ENCODED_LEN: usize = 42usize;
25261    fn deser(
25262        _version: MavlinkVersion,
25263        __input: &[u8],
25264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25265        let avail_len = __input.len();
25266        let mut payload_buf = [0; Self::ENCODED_LEN];
25267        let mut buf = if avail_len < Self::ENCODED_LEN {
25268            payload_buf[0..avail_len].copy_from_slice(__input);
25269            Bytes::new(&payload_buf)
25270        } else {
25271            Bytes::new(__input)
25272        };
25273        let mut __struct = Self::default();
25274        __struct.time_boot_ms = buf.get_u32_le();
25275        __struct.chan1_raw = buf.get_u16_le();
25276        __struct.chan2_raw = buf.get_u16_le();
25277        __struct.chan3_raw = buf.get_u16_le();
25278        __struct.chan4_raw = buf.get_u16_le();
25279        __struct.chan5_raw = buf.get_u16_le();
25280        __struct.chan6_raw = buf.get_u16_le();
25281        __struct.chan7_raw = buf.get_u16_le();
25282        __struct.chan8_raw = buf.get_u16_le();
25283        __struct.chan9_raw = buf.get_u16_le();
25284        __struct.chan10_raw = buf.get_u16_le();
25285        __struct.chan11_raw = buf.get_u16_le();
25286        __struct.chan12_raw = buf.get_u16_le();
25287        __struct.chan13_raw = buf.get_u16_le();
25288        __struct.chan14_raw = buf.get_u16_le();
25289        __struct.chan15_raw = buf.get_u16_le();
25290        __struct.chan16_raw = buf.get_u16_le();
25291        __struct.chan17_raw = buf.get_u16_le();
25292        __struct.chan18_raw = buf.get_u16_le();
25293        __struct.chancount = buf.get_u8();
25294        __struct.rssi = buf.get_u8();
25295        Ok(__struct)
25296    }
25297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25298        let mut __tmp = BytesMut::new(bytes);
25299        #[allow(clippy::absurd_extreme_comparisons)]
25300        #[allow(unused_comparisons)]
25301        if __tmp.remaining() < Self::ENCODED_LEN {
25302            panic!(
25303                "buffer is too small (need {} bytes, but got {})",
25304                Self::ENCODED_LEN,
25305                __tmp.remaining(),
25306            )
25307        }
25308        __tmp.put_u32_le(self.time_boot_ms);
25309        __tmp.put_u16_le(self.chan1_raw);
25310        __tmp.put_u16_le(self.chan2_raw);
25311        __tmp.put_u16_le(self.chan3_raw);
25312        __tmp.put_u16_le(self.chan4_raw);
25313        __tmp.put_u16_le(self.chan5_raw);
25314        __tmp.put_u16_le(self.chan6_raw);
25315        __tmp.put_u16_le(self.chan7_raw);
25316        __tmp.put_u16_le(self.chan8_raw);
25317        __tmp.put_u16_le(self.chan9_raw);
25318        __tmp.put_u16_le(self.chan10_raw);
25319        __tmp.put_u16_le(self.chan11_raw);
25320        __tmp.put_u16_le(self.chan12_raw);
25321        __tmp.put_u16_le(self.chan13_raw);
25322        __tmp.put_u16_le(self.chan14_raw);
25323        __tmp.put_u16_le(self.chan15_raw);
25324        __tmp.put_u16_le(self.chan16_raw);
25325        __tmp.put_u16_le(self.chan17_raw);
25326        __tmp.put_u16_le(self.chan18_raw);
25327        __tmp.put_u8(self.chancount);
25328        __tmp.put_u8(self.rssi);
25329        if matches!(version, MavlinkVersion::V2) {
25330            let len = __tmp.len();
25331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25332        } else {
25333            __tmp.len()
25334        }
25335    }
25336}
25337#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25338#[doc = ""]
25339#[doc = "ID: 70"]
25340#[derive(Debug, Clone, PartialEq)]
25341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25343#[cfg_attr(feature = "ts", derive(TS))]
25344#[cfg_attr(feature = "ts", ts(export))]
25345pub struct RC_CHANNELS_OVERRIDE_DATA {
25346    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25347    pub chan1_raw: u16,
25348    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25349    pub chan2_raw: u16,
25350    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25351    pub chan3_raw: u16,
25352    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25353    pub chan4_raw: u16,
25354    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25355    pub chan5_raw: u16,
25356    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25357    pub chan6_raw: u16,
25358    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25359    pub chan7_raw: u16,
25360    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25361    pub chan8_raw: u16,
25362    #[doc = "System ID"]
25363    pub target_system: u8,
25364    #[doc = "Component ID"]
25365    pub target_component: u8,
25366    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25368    pub chan9_raw: u16,
25369    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25371    pub chan10_raw: u16,
25372    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25374    pub chan11_raw: u16,
25375    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25377    pub chan12_raw: u16,
25378    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25380    pub chan13_raw: u16,
25381    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25383    pub chan14_raw: u16,
25384    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25386    pub chan15_raw: u16,
25387    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25389    pub chan16_raw: u16,
25390    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25392    pub chan17_raw: u16,
25393    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25394    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25395    pub chan18_raw: u16,
25396}
25397impl RC_CHANNELS_OVERRIDE_DATA {
25398    pub const ENCODED_LEN: usize = 38usize;
25399    pub const DEFAULT: Self = Self {
25400        chan1_raw: 0_u16,
25401        chan2_raw: 0_u16,
25402        chan3_raw: 0_u16,
25403        chan4_raw: 0_u16,
25404        chan5_raw: 0_u16,
25405        chan6_raw: 0_u16,
25406        chan7_raw: 0_u16,
25407        chan8_raw: 0_u16,
25408        target_system: 0_u8,
25409        target_component: 0_u8,
25410        chan9_raw: 0_u16,
25411        chan10_raw: 0_u16,
25412        chan11_raw: 0_u16,
25413        chan12_raw: 0_u16,
25414        chan13_raw: 0_u16,
25415        chan14_raw: 0_u16,
25416        chan15_raw: 0_u16,
25417        chan16_raw: 0_u16,
25418        chan17_raw: 0_u16,
25419        chan18_raw: 0_u16,
25420    };
25421    #[cfg(feature = "arbitrary")]
25422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25423        use arbitrary::{Arbitrary, Unstructured};
25424        let mut buf = [0u8; 1024];
25425        rng.fill_bytes(&mut buf);
25426        let mut unstructured = Unstructured::new(&buf);
25427        Self::arbitrary(&mut unstructured).unwrap_or_default()
25428    }
25429}
25430impl Default for RC_CHANNELS_OVERRIDE_DATA {
25431    fn default() -> Self {
25432        Self::DEFAULT.clone()
25433    }
25434}
25435impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25436    type Message = MavMessage;
25437    const ID: u32 = 70u32;
25438    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25439    const EXTRA_CRC: u8 = 124u8;
25440    const ENCODED_LEN: usize = 38usize;
25441    fn deser(
25442        _version: MavlinkVersion,
25443        __input: &[u8],
25444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25445        let avail_len = __input.len();
25446        let mut payload_buf = [0; Self::ENCODED_LEN];
25447        let mut buf = if avail_len < Self::ENCODED_LEN {
25448            payload_buf[0..avail_len].copy_from_slice(__input);
25449            Bytes::new(&payload_buf)
25450        } else {
25451            Bytes::new(__input)
25452        };
25453        let mut __struct = Self::default();
25454        __struct.chan1_raw = buf.get_u16_le();
25455        __struct.chan2_raw = buf.get_u16_le();
25456        __struct.chan3_raw = buf.get_u16_le();
25457        __struct.chan4_raw = buf.get_u16_le();
25458        __struct.chan5_raw = buf.get_u16_le();
25459        __struct.chan6_raw = buf.get_u16_le();
25460        __struct.chan7_raw = buf.get_u16_le();
25461        __struct.chan8_raw = buf.get_u16_le();
25462        __struct.target_system = buf.get_u8();
25463        __struct.target_component = buf.get_u8();
25464        __struct.chan9_raw = buf.get_u16_le();
25465        __struct.chan10_raw = buf.get_u16_le();
25466        __struct.chan11_raw = buf.get_u16_le();
25467        __struct.chan12_raw = buf.get_u16_le();
25468        __struct.chan13_raw = buf.get_u16_le();
25469        __struct.chan14_raw = buf.get_u16_le();
25470        __struct.chan15_raw = buf.get_u16_le();
25471        __struct.chan16_raw = buf.get_u16_le();
25472        __struct.chan17_raw = buf.get_u16_le();
25473        __struct.chan18_raw = buf.get_u16_le();
25474        Ok(__struct)
25475    }
25476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25477        let mut __tmp = BytesMut::new(bytes);
25478        #[allow(clippy::absurd_extreme_comparisons)]
25479        #[allow(unused_comparisons)]
25480        if __tmp.remaining() < Self::ENCODED_LEN {
25481            panic!(
25482                "buffer is too small (need {} bytes, but got {})",
25483                Self::ENCODED_LEN,
25484                __tmp.remaining(),
25485            )
25486        }
25487        __tmp.put_u16_le(self.chan1_raw);
25488        __tmp.put_u16_le(self.chan2_raw);
25489        __tmp.put_u16_le(self.chan3_raw);
25490        __tmp.put_u16_le(self.chan4_raw);
25491        __tmp.put_u16_le(self.chan5_raw);
25492        __tmp.put_u16_le(self.chan6_raw);
25493        __tmp.put_u16_le(self.chan7_raw);
25494        __tmp.put_u16_le(self.chan8_raw);
25495        __tmp.put_u8(self.target_system);
25496        __tmp.put_u8(self.target_component);
25497        if matches!(version, MavlinkVersion::V2) {
25498            __tmp.put_u16_le(self.chan9_raw);
25499            __tmp.put_u16_le(self.chan10_raw);
25500            __tmp.put_u16_le(self.chan11_raw);
25501            __tmp.put_u16_le(self.chan12_raw);
25502            __tmp.put_u16_le(self.chan13_raw);
25503            __tmp.put_u16_le(self.chan14_raw);
25504            __tmp.put_u16_le(self.chan15_raw);
25505            __tmp.put_u16_le(self.chan16_raw);
25506            __tmp.put_u16_le(self.chan17_raw);
25507            __tmp.put_u16_le(self.chan18_raw);
25508            let len = __tmp.len();
25509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25510        } else {
25511            __tmp.len()
25512        }
25513    }
25514}
25515#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25516#[doc = ""]
25517#[doc = "ID: 35"]
25518#[derive(Debug, Clone, PartialEq)]
25519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25521#[cfg_attr(feature = "ts", derive(TS))]
25522#[cfg_attr(feature = "ts", ts(export))]
25523pub struct RC_CHANNELS_RAW_DATA {
25524    #[doc = "Timestamp (time since system boot)."]
25525    pub time_boot_ms: u32,
25526    #[doc = "RC channel 1 value."]
25527    pub chan1_raw: u16,
25528    #[doc = "RC channel 2 value."]
25529    pub chan2_raw: u16,
25530    #[doc = "RC channel 3 value."]
25531    pub chan3_raw: u16,
25532    #[doc = "RC channel 4 value."]
25533    pub chan4_raw: u16,
25534    #[doc = "RC channel 5 value."]
25535    pub chan5_raw: u16,
25536    #[doc = "RC channel 6 value."]
25537    pub chan6_raw: u16,
25538    #[doc = "RC channel 7 value."]
25539    pub chan7_raw: u16,
25540    #[doc = "RC channel 8 value."]
25541    pub chan8_raw: u16,
25542    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25543    pub port: u8,
25544    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25545    pub rssi: u8,
25546}
25547impl RC_CHANNELS_RAW_DATA {
25548    pub const ENCODED_LEN: usize = 22usize;
25549    pub const DEFAULT: Self = Self {
25550        time_boot_ms: 0_u32,
25551        chan1_raw: 0_u16,
25552        chan2_raw: 0_u16,
25553        chan3_raw: 0_u16,
25554        chan4_raw: 0_u16,
25555        chan5_raw: 0_u16,
25556        chan6_raw: 0_u16,
25557        chan7_raw: 0_u16,
25558        chan8_raw: 0_u16,
25559        port: 0_u8,
25560        rssi: 0_u8,
25561    };
25562    #[cfg(feature = "arbitrary")]
25563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25564        use arbitrary::{Arbitrary, Unstructured};
25565        let mut buf = [0u8; 1024];
25566        rng.fill_bytes(&mut buf);
25567        let mut unstructured = Unstructured::new(&buf);
25568        Self::arbitrary(&mut unstructured).unwrap_or_default()
25569    }
25570}
25571impl Default for RC_CHANNELS_RAW_DATA {
25572    fn default() -> Self {
25573        Self::DEFAULT.clone()
25574    }
25575}
25576impl MessageData for RC_CHANNELS_RAW_DATA {
25577    type Message = MavMessage;
25578    const ID: u32 = 35u32;
25579    const NAME: &'static str = "RC_CHANNELS_RAW";
25580    const EXTRA_CRC: u8 = 244u8;
25581    const ENCODED_LEN: usize = 22usize;
25582    fn deser(
25583        _version: MavlinkVersion,
25584        __input: &[u8],
25585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25586        let avail_len = __input.len();
25587        let mut payload_buf = [0; Self::ENCODED_LEN];
25588        let mut buf = if avail_len < Self::ENCODED_LEN {
25589            payload_buf[0..avail_len].copy_from_slice(__input);
25590            Bytes::new(&payload_buf)
25591        } else {
25592            Bytes::new(__input)
25593        };
25594        let mut __struct = Self::default();
25595        __struct.time_boot_ms = buf.get_u32_le();
25596        __struct.chan1_raw = buf.get_u16_le();
25597        __struct.chan2_raw = buf.get_u16_le();
25598        __struct.chan3_raw = buf.get_u16_le();
25599        __struct.chan4_raw = buf.get_u16_le();
25600        __struct.chan5_raw = buf.get_u16_le();
25601        __struct.chan6_raw = buf.get_u16_le();
25602        __struct.chan7_raw = buf.get_u16_le();
25603        __struct.chan8_raw = buf.get_u16_le();
25604        __struct.port = buf.get_u8();
25605        __struct.rssi = buf.get_u8();
25606        Ok(__struct)
25607    }
25608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25609        let mut __tmp = BytesMut::new(bytes);
25610        #[allow(clippy::absurd_extreme_comparisons)]
25611        #[allow(unused_comparisons)]
25612        if __tmp.remaining() < Self::ENCODED_LEN {
25613            panic!(
25614                "buffer is too small (need {} bytes, but got {})",
25615                Self::ENCODED_LEN,
25616                __tmp.remaining(),
25617            )
25618        }
25619        __tmp.put_u32_le(self.time_boot_ms);
25620        __tmp.put_u16_le(self.chan1_raw);
25621        __tmp.put_u16_le(self.chan2_raw);
25622        __tmp.put_u16_le(self.chan3_raw);
25623        __tmp.put_u16_le(self.chan4_raw);
25624        __tmp.put_u16_le(self.chan5_raw);
25625        __tmp.put_u16_le(self.chan6_raw);
25626        __tmp.put_u16_le(self.chan7_raw);
25627        __tmp.put_u16_le(self.chan8_raw);
25628        __tmp.put_u8(self.port);
25629        __tmp.put_u8(self.rssi);
25630        if matches!(version, MavlinkVersion::V2) {
25631            let len = __tmp.len();
25632            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25633        } else {
25634            __tmp.len()
25635        }
25636    }
25637}
25638#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25639#[doc = ""]
25640#[doc = "ID: 34"]
25641#[derive(Debug, Clone, PartialEq)]
25642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25644#[cfg_attr(feature = "ts", derive(TS))]
25645#[cfg_attr(feature = "ts", ts(export))]
25646pub struct RC_CHANNELS_SCALED_DATA {
25647    #[doc = "Timestamp (time since system boot)."]
25648    pub time_boot_ms: u32,
25649    #[doc = "RC channel 1 value scaled."]
25650    pub chan1_scaled: i16,
25651    #[doc = "RC channel 2 value scaled."]
25652    pub chan2_scaled: i16,
25653    #[doc = "RC channel 3 value scaled."]
25654    pub chan3_scaled: i16,
25655    #[doc = "RC channel 4 value scaled."]
25656    pub chan4_scaled: i16,
25657    #[doc = "RC channel 5 value scaled."]
25658    pub chan5_scaled: i16,
25659    #[doc = "RC channel 6 value scaled."]
25660    pub chan6_scaled: i16,
25661    #[doc = "RC channel 7 value scaled."]
25662    pub chan7_scaled: i16,
25663    #[doc = "RC channel 8 value scaled."]
25664    pub chan8_scaled: i16,
25665    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25666    pub port: u8,
25667    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25668    pub rssi: u8,
25669}
25670impl RC_CHANNELS_SCALED_DATA {
25671    pub const ENCODED_LEN: usize = 22usize;
25672    pub const DEFAULT: Self = Self {
25673        time_boot_ms: 0_u32,
25674        chan1_scaled: 0_i16,
25675        chan2_scaled: 0_i16,
25676        chan3_scaled: 0_i16,
25677        chan4_scaled: 0_i16,
25678        chan5_scaled: 0_i16,
25679        chan6_scaled: 0_i16,
25680        chan7_scaled: 0_i16,
25681        chan8_scaled: 0_i16,
25682        port: 0_u8,
25683        rssi: 0_u8,
25684    };
25685    #[cfg(feature = "arbitrary")]
25686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25687        use arbitrary::{Arbitrary, Unstructured};
25688        let mut buf = [0u8; 1024];
25689        rng.fill_bytes(&mut buf);
25690        let mut unstructured = Unstructured::new(&buf);
25691        Self::arbitrary(&mut unstructured).unwrap_or_default()
25692    }
25693}
25694impl Default for RC_CHANNELS_SCALED_DATA {
25695    fn default() -> Self {
25696        Self::DEFAULT.clone()
25697    }
25698}
25699impl MessageData for RC_CHANNELS_SCALED_DATA {
25700    type Message = MavMessage;
25701    const ID: u32 = 34u32;
25702    const NAME: &'static str = "RC_CHANNELS_SCALED";
25703    const EXTRA_CRC: u8 = 237u8;
25704    const ENCODED_LEN: usize = 22usize;
25705    fn deser(
25706        _version: MavlinkVersion,
25707        __input: &[u8],
25708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25709        let avail_len = __input.len();
25710        let mut payload_buf = [0; Self::ENCODED_LEN];
25711        let mut buf = if avail_len < Self::ENCODED_LEN {
25712            payload_buf[0..avail_len].copy_from_slice(__input);
25713            Bytes::new(&payload_buf)
25714        } else {
25715            Bytes::new(__input)
25716        };
25717        let mut __struct = Self::default();
25718        __struct.time_boot_ms = buf.get_u32_le();
25719        __struct.chan1_scaled = buf.get_i16_le();
25720        __struct.chan2_scaled = buf.get_i16_le();
25721        __struct.chan3_scaled = buf.get_i16_le();
25722        __struct.chan4_scaled = buf.get_i16_le();
25723        __struct.chan5_scaled = buf.get_i16_le();
25724        __struct.chan6_scaled = buf.get_i16_le();
25725        __struct.chan7_scaled = buf.get_i16_le();
25726        __struct.chan8_scaled = buf.get_i16_le();
25727        __struct.port = buf.get_u8();
25728        __struct.rssi = buf.get_u8();
25729        Ok(__struct)
25730    }
25731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25732        let mut __tmp = BytesMut::new(bytes);
25733        #[allow(clippy::absurd_extreme_comparisons)]
25734        #[allow(unused_comparisons)]
25735        if __tmp.remaining() < Self::ENCODED_LEN {
25736            panic!(
25737                "buffer is too small (need {} bytes, but got {})",
25738                Self::ENCODED_LEN,
25739                __tmp.remaining(),
25740            )
25741        }
25742        __tmp.put_u32_le(self.time_boot_ms);
25743        __tmp.put_i16_le(self.chan1_scaled);
25744        __tmp.put_i16_le(self.chan2_scaled);
25745        __tmp.put_i16_le(self.chan3_scaled);
25746        __tmp.put_i16_le(self.chan4_scaled);
25747        __tmp.put_i16_le(self.chan5_scaled);
25748        __tmp.put_i16_le(self.chan6_scaled);
25749        __tmp.put_i16_le(self.chan7_scaled);
25750        __tmp.put_i16_le(self.chan8_scaled);
25751        __tmp.put_u8(self.port);
25752        __tmp.put_u8(self.rssi);
25753        if matches!(version, MavlinkVersion::V2) {
25754            let len = __tmp.len();
25755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25756        } else {
25757            __tmp.len()
25758        }
25759    }
25760}
25761#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25762#[doc = "Request a data stream."]
25763#[doc = ""]
25764#[doc = "ID: 66"]
25765#[derive(Debug, Clone, PartialEq)]
25766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25768#[cfg_attr(feature = "ts", derive(TS))]
25769#[cfg_attr(feature = "ts", ts(export))]
25770pub struct REQUEST_DATA_STREAM_DATA {
25771    #[doc = "The requested message rate"]
25772    pub req_message_rate: u16,
25773    #[doc = "The target requested to send the message stream."]
25774    pub target_system: u8,
25775    #[doc = "The target requested to send the message stream."]
25776    pub target_component: u8,
25777    #[doc = "The ID of the requested data stream"]
25778    pub req_stream_id: u8,
25779    #[doc = "1 to start sending, 0 to stop sending."]
25780    pub start_stop: u8,
25781}
25782impl REQUEST_DATA_STREAM_DATA {
25783    pub const ENCODED_LEN: usize = 6usize;
25784    pub const DEFAULT: Self = Self {
25785        req_message_rate: 0_u16,
25786        target_system: 0_u8,
25787        target_component: 0_u8,
25788        req_stream_id: 0_u8,
25789        start_stop: 0_u8,
25790    };
25791    #[cfg(feature = "arbitrary")]
25792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25793        use arbitrary::{Arbitrary, Unstructured};
25794        let mut buf = [0u8; 1024];
25795        rng.fill_bytes(&mut buf);
25796        let mut unstructured = Unstructured::new(&buf);
25797        Self::arbitrary(&mut unstructured).unwrap_or_default()
25798    }
25799}
25800impl Default for REQUEST_DATA_STREAM_DATA {
25801    fn default() -> Self {
25802        Self::DEFAULT.clone()
25803    }
25804}
25805impl MessageData for REQUEST_DATA_STREAM_DATA {
25806    type Message = MavMessage;
25807    const ID: u32 = 66u32;
25808    const NAME: &'static str = "REQUEST_DATA_STREAM";
25809    const EXTRA_CRC: u8 = 148u8;
25810    const ENCODED_LEN: usize = 6usize;
25811    fn deser(
25812        _version: MavlinkVersion,
25813        __input: &[u8],
25814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25815        let avail_len = __input.len();
25816        let mut payload_buf = [0; Self::ENCODED_LEN];
25817        let mut buf = if avail_len < Self::ENCODED_LEN {
25818            payload_buf[0..avail_len].copy_from_slice(__input);
25819            Bytes::new(&payload_buf)
25820        } else {
25821            Bytes::new(__input)
25822        };
25823        let mut __struct = Self::default();
25824        __struct.req_message_rate = buf.get_u16_le();
25825        __struct.target_system = buf.get_u8();
25826        __struct.target_component = buf.get_u8();
25827        __struct.req_stream_id = buf.get_u8();
25828        __struct.start_stop = buf.get_u8();
25829        Ok(__struct)
25830    }
25831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25832        let mut __tmp = BytesMut::new(bytes);
25833        #[allow(clippy::absurd_extreme_comparisons)]
25834        #[allow(unused_comparisons)]
25835        if __tmp.remaining() < Self::ENCODED_LEN {
25836            panic!(
25837                "buffer is too small (need {} bytes, but got {})",
25838                Self::ENCODED_LEN,
25839                __tmp.remaining(),
25840            )
25841        }
25842        __tmp.put_u16_le(self.req_message_rate);
25843        __tmp.put_u8(self.target_system);
25844        __tmp.put_u8(self.target_component);
25845        __tmp.put_u8(self.req_stream_id);
25846        __tmp.put_u8(self.start_stop);
25847        if matches!(version, MavlinkVersion::V2) {
25848            let len = __tmp.len();
25849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25850        } else {
25851            __tmp.len()
25852        }
25853    }
25854}
25855#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25856#[doc = ""]
25857#[doc = "ID: 412"]
25858#[derive(Debug, Clone, PartialEq)]
25859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25861#[cfg_attr(feature = "ts", derive(TS))]
25862#[cfg_attr(feature = "ts", ts(export))]
25863pub struct REQUEST_EVENT_DATA {
25864    #[doc = "First sequence number of the requested event."]
25865    pub first_sequence: u16,
25866    #[doc = "Last sequence number of the requested event."]
25867    pub last_sequence: u16,
25868    #[doc = "System ID"]
25869    pub target_system: u8,
25870    #[doc = "Component ID"]
25871    pub target_component: u8,
25872}
25873impl REQUEST_EVENT_DATA {
25874    pub const ENCODED_LEN: usize = 6usize;
25875    pub const DEFAULT: Self = Self {
25876        first_sequence: 0_u16,
25877        last_sequence: 0_u16,
25878        target_system: 0_u8,
25879        target_component: 0_u8,
25880    };
25881    #[cfg(feature = "arbitrary")]
25882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25883        use arbitrary::{Arbitrary, Unstructured};
25884        let mut buf = [0u8; 1024];
25885        rng.fill_bytes(&mut buf);
25886        let mut unstructured = Unstructured::new(&buf);
25887        Self::arbitrary(&mut unstructured).unwrap_or_default()
25888    }
25889}
25890impl Default for REQUEST_EVENT_DATA {
25891    fn default() -> Self {
25892        Self::DEFAULT.clone()
25893    }
25894}
25895impl MessageData for REQUEST_EVENT_DATA {
25896    type Message = MavMessage;
25897    const ID: u32 = 412u32;
25898    const NAME: &'static str = "REQUEST_EVENT";
25899    const EXTRA_CRC: u8 = 33u8;
25900    const ENCODED_LEN: usize = 6usize;
25901    fn deser(
25902        _version: MavlinkVersion,
25903        __input: &[u8],
25904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25905        let avail_len = __input.len();
25906        let mut payload_buf = [0; Self::ENCODED_LEN];
25907        let mut buf = if avail_len < Self::ENCODED_LEN {
25908            payload_buf[0..avail_len].copy_from_slice(__input);
25909            Bytes::new(&payload_buf)
25910        } else {
25911            Bytes::new(__input)
25912        };
25913        let mut __struct = Self::default();
25914        __struct.first_sequence = buf.get_u16_le();
25915        __struct.last_sequence = buf.get_u16_le();
25916        __struct.target_system = buf.get_u8();
25917        __struct.target_component = buf.get_u8();
25918        Ok(__struct)
25919    }
25920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25921        let mut __tmp = BytesMut::new(bytes);
25922        #[allow(clippy::absurd_extreme_comparisons)]
25923        #[allow(unused_comparisons)]
25924        if __tmp.remaining() < Self::ENCODED_LEN {
25925            panic!(
25926                "buffer is too small (need {} bytes, but got {})",
25927                Self::ENCODED_LEN,
25928                __tmp.remaining(),
25929            )
25930        }
25931        __tmp.put_u16_le(self.first_sequence);
25932        __tmp.put_u16_le(self.last_sequence);
25933        __tmp.put_u8(self.target_system);
25934        __tmp.put_u8(self.target_component);
25935        if matches!(version, MavlinkVersion::V2) {
25936            let len = __tmp.len();
25937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25938        } else {
25939            __tmp.len()
25940        }
25941    }
25942}
25943#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25944#[doc = ""]
25945#[doc = "ID: 142"]
25946#[derive(Debug, Clone, PartialEq)]
25947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25949#[cfg_attr(feature = "ts", derive(TS))]
25950#[cfg_attr(feature = "ts", ts(export))]
25951pub struct RESOURCE_REQUEST_DATA {
25952    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25953    pub request_id: u8,
25954    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25955    pub uri_type: u8,
25956    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25959    pub uri: [u8; 120],
25960    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25961    pub transfer_type: u8,
25962    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25965    pub storage: [u8; 120],
25966}
25967impl RESOURCE_REQUEST_DATA {
25968    pub const ENCODED_LEN: usize = 243usize;
25969    pub const DEFAULT: Self = Self {
25970        request_id: 0_u8,
25971        uri_type: 0_u8,
25972        uri: [0_u8; 120usize],
25973        transfer_type: 0_u8,
25974        storage: [0_u8; 120usize],
25975    };
25976    #[cfg(feature = "arbitrary")]
25977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25978        use arbitrary::{Arbitrary, Unstructured};
25979        let mut buf = [0u8; 1024];
25980        rng.fill_bytes(&mut buf);
25981        let mut unstructured = Unstructured::new(&buf);
25982        Self::arbitrary(&mut unstructured).unwrap_or_default()
25983    }
25984}
25985impl Default for RESOURCE_REQUEST_DATA {
25986    fn default() -> Self {
25987        Self::DEFAULT.clone()
25988    }
25989}
25990impl MessageData for RESOURCE_REQUEST_DATA {
25991    type Message = MavMessage;
25992    const ID: u32 = 142u32;
25993    const NAME: &'static str = "RESOURCE_REQUEST";
25994    const EXTRA_CRC: u8 = 72u8;
25995    const ENCODED_LEN: usize = 243usize;
25996    fn deser(
25997        _version: MavlinkVersion,
25998        __input: &[u8],
25999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26000        let avail_len = __input.len();
26001        let mut payload_buf = [0; Self::ENCODED_LEN];
26002        let mut buf = if avail_len < Self::ENCODED_LEN {
26003            payload_buf[0..avail_len].copy_from_slice(__input);
26004            Bytes::new(&payload_buf)
26005        } else {
26006            Bytes::new(__input)
26007        };
26008        let mut __struct = Self::default();
26009        __struct.request_id = buf.get_u8();
26010        __struct.uri_type = buf.get_u8();
26011        for v in &mut __struct.uri {
26012            let val = buf.get_u8();
26013            *v = val;
26014        }
26015        __struct.transfer_type = buf.get_u8();
26016        for v in &mut __struct.storage {
26017            let val = buf.get_u8();
26018            *v = val;
26019        }
26020        Ok(__struct)
26021    }
26022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26023        let mut __tmp = BytesMut::new(bytes);
26024        #[allow(clippy::absurd_extreme_comparisons)]
26025        #[allow(unused_comparisons)]
26026        if __tmp.remaining() < Self::ENCODED_LEN {
26027            panic!(
26028                "buffer is too small (need {} bytes, but got {})",
26029                Self::ENCODED_LEN,
26030                __tmp.remaining(),
26031            )
26032        }
26033        __tmp.put_u8(self.request_id);
26034        __tmp.put_u8(self.uri_type);
26035        for val in &self.uri {
26036            __tmp.put_u8(*val);
26037        }
26038        __tmp.put_u8(self.transfer_type);
26039        for val in &self.storage {
26040            __tmp.put_u8(*val);
26041        }
26042        if matches!(version, MavlinkVersion::V2) {
26043            let len = __tmp.len();
26044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26045        } else {
26046            __tmp.len()
26047        }
26048    }
26049}
26050#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26051#[doc = ""]
26052#[doc = "ID: 413"]
26053#[derive(Debug, Clone, PartialEq)]
26054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26056#[cfg_attr(feature = "ts", derive(TS))]
26057#[cfg_attr(feature = "ts", ts(export))]
26058pub struct RESPONSE_EVENT_ERROR_DATA {
26059    #[doc = "Sequence number."]
26060    pub sequence: u16,
26061    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26062    pub sequence_oldest_available: u16,
26063    #[doc = "System ID"]
26064    pub target_system: u8,
26065    #[doc = "Component ID"]
26066    pub target_component: u8,
26067    #[doc = "Error reason."]
26068    pub reason: MavEventErrorReason,
26069}
26070impl RESPONSE_EVENT_ERROR_DATA {
26071    pub const ENCODED_LEN: usize = 7usize;
26072    pub const DEFAULT: Self = Self {
26073        sequence: 0_u16,
26074        sequence_oldest_available: 0_u16,
26075        target_system: 0_u8,
26076        target_component: 0_u8,
26077        reason: MavEventErrorReason::DEFAULT,
26078    };
26079    #[cfg(feature = "arbitrary")]
26080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26081        use arbitrary::{Arbitrary, Unstructured};
26082        let mut buf = [0u8; 1024];
26083        rng.fill_bytes(&mut buf);
26084        let mut unstructured = Unstructured::new(&buf);
26085        Self::arbitrary(&mut unstructured).unwrap_or_default()
26086    }
26087}
26088impl Default for RESPONSE_EVENT_ERROR_DATA {
26089    fn default() -> Self {
26090        Self::DEFAULT.clone()
26091    }
26092}
26093impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26094    type Message = MavMessage;
26095    const ID: u32 = 413u32;
26096    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26097    const EXTRA_CRC: u8 = 77u8;
26098    const ENCODED_LEN: usize = 7usize;
26099    fn deser(
26100        _version: MavlinkVersion,
26101        __input: &[u8],
26102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26103        let avail_len = __input.len();
26104        let mut payload_buf = [0; Self::ENCODED_LEN];
26105        let mut buf = if avail_len < Self::ENCODED_LEN {
26106            payload_buf[0..avail_len].copy_from_slice(__input);
26107            Bytes::new(&payload_buf)
26108        } else {
26109            Bytes::new(__input)
26110        };
26111        let mut __struct = Self::default();
26112        __struct.sequence = buf.get_u16_le();
26113        __struct.sequence_oldest_available = buf.get_u16_le();
26114        __struct.target_system = buf.get_u8();
26115        __struct.target_component = buf.get_u8();
26116        let tmp = buf.get_u8();
26117        __struct.reason =
26118            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26119                enum_type: "MavEventErrorReason",
26120                value: tmp as u32,
26121            })?;
26122        Ok(__struct)
26123    }
26124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26125        let mut __tmp = BytesMut::new(bytes);
26126        #[allow(clippy::absurd_extreme_comparisons)]
26127        #[allow(unused_comparisons)]
26128        if __tmp.remaining() < Self::ENCODED_LEN {
26129            panic!(
26130                "buffer is too small (need {} bytes, but got {})",
26131                Self::ENCODED_LEN,
26132                __tmp.remaining(),
26133            )
26134        }
26135        __tmp.put_u16_le(self.sequence);
26136        __tmp.put_u16_le(self.sequence_oldest_available);
26137        __tmp.put_u8(self.target_system);
26138        __tmp.put_u8(self.target_component);
26139        __tmp.put_u8(self.reason as u8);
26140        if matches!(version, MavlinkVersion::V2) {
26141            let len = __tmp.len();
26142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26143        } else {
26144            __tmp.len()
26145        }
26146    }
26147}
26148#[doc = "Read out the safety zone the MAV currently assumes."]
26149#[doc = ""]
26150#[doc = "ID: 55"]
26151#[derive(Debug, Clone, PartialEq)]
26152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26154#[cfg_attr(feature = "ts", derive(TS))]
26155#[cfg_attr(feature = "ts", ts(export))]
26156pub struct SAFETY_ALLOWED_AREA_DATA {
26157    #[doc = "x position 1 / Latitude 1"]
26158    pub p1x: f32,
26159    #[doc = "y position 1 / Longitude 1"]
26160    pub p1y: f32,
26161    #[doc = "z position 1 / Altitude 1"]
26162    pub p1z: f32,
26163    #[doc = "x position 2 / Latitude 2"]
26164    pub p2x: f32,
26165    #[doc = "y position 2 / Longitude 2"]
26166    pub p2y: f32,
26167    #[doc = "z position 2 / Altitude 2"]
26168    pub p2z: f32,
26169    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26170    pub frame: MavFrame,
26171}
26172impl SAFETY_ALLOWED_AREA_DATA {
26173    pub const ENCODED_LEN: usize = 25usize;
26174    pub const DEFAULT: Self = Self {
26175        p1x: 0.0_f32,
26176        p1y: 0.0_f32,
26177        p1z: 0.0_f32,
26178        p2x: 0.0_f32,
26179        p2y: 0.0_f32,
26180        p2z: 0.0_f32,
26181        frame: MavFrame::DEFAULT,
26182    };
26183    #[cfg(feature = "arbitrary")]
26184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26185        use arbitrary::{Arbitrary, Unstructured};
26186        let mut buf = [0u8; 1024];
26187        rng.fill_bytes(&mut buf);
26188        let mut unstructured = Unstructured::new(&buf);
26189        Self::arbitrary(&mut unstructured).unwrap_or_default()
26190    }
26191}
26192impl Default for SAFETY_ALLOWED_AREA_DATA {
26193    fn default() -> Self {
26194        Self::DEFAULT.clone()
26195    }
26196}
26197impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26198    type Message = MavMessage;
26199    const ID: u32 = 55u32;
26200    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26201    const EXTRA_CRC: u8 = 3u8;
26202    const ENCODED_LEN: usize = 25usize;
26203    fn deser(
26204        _version: MavlinkVersion,
26205        __input: &[u8],
26206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26207        let avail_len = __input.len();
26208        let mut payload_buf = [0; Self::ENCODED_LEN];
26209        let mut buf = if avail_len < Self::ENCODED_LEN {
26210            payload_buf[0..avail_len].copy_from_slice(__input);
26211            Bytes::new(&payload_buf)
26212        } else {
26213            Bytes::new(__input)
26214        };
26215        let mut __struct = Self::default();
26216        __struct.p1x = buf.get_f32_le();
26217        __struct.p1y = buf.get_f32_le();
26218        __struct.p1z = buf.get_f32_le();
26219        __struct.p2x = buf.get_f32_le();
26220        __struct.p2y = buf.get_f32_le();
26221        __struct.p2z = buf.get_f32_le();
26222        let tmp = buf.get_u8();
26223        __struct.frame =
26224            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26225                enum_type: "MavFrame",
26226                value: tmp as u32,
26227            })?;
26228        Ok(__struct)
26229    }
26230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26231        let mut __tmp = BytesMut::new(bytes);
26232        #[allow(clippy::absurd_extreme_comparisons)]
26233        #[allow(unused_comparisons)]
26234        if __tmp.remaining() < Self::ENCODED_LEN {
26235            panic!(
26236                "buffer is too small (need {} bytes, but got {})",
26237                Self::ENCODED_LEN,
26238                __tmp.remaining(),
26239            )
26240        }
26241        __tmp.put_f32_le(self.p1x);
26242        __tmp.put_f32_le(self.p1y);
26243        __tmp.put_f32_le(self.p1z);
26244        __tmp.put_f32_le(self.p2x);
26245        __tmp.put_f32_le(self.p2y);
26246        __tmp.put_f32_le(self.p2z);
26247        __tmp.put_u8(self.frame as u8);
26248        if matches!(version, MavlinkVersion::V2) {
26249            let len = __tmp.len();
26250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26251        } else {
26252            __tmp.len()
26253        }
26254    }
26255}
26256#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26257#[doc = ""]
26258#[doc = "ID: 54"]
26259#[derive(Debug, Clone, PartialEq)]
26260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26262#[cfg_attr(feature = "ts", derive(TS))]
26263#[cfg_attr(feature = "ts", ts(export))]
26264pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26265    #[doc = "x position 1 / Latitude 1"]
26266    pub p1x: f32,
26267    #[doc = "y position 1 / Longitude 1"]
26268    pub p1y: f32,
26269    #[doc = "z position 1 / Altitude 1"]
26270    pub p1z: f32,
26271    #[doc = "x position 2 / Latitude 2"]
26272    pub p2x: f32,
26273    #[doc = "y position 2 / Longitude 2"]
26274    pub p2y: f32,
26275    #[doc = "z position 2 / Altitude 2"]
26276    pub p2z: f32,
26277    #[doc = "System ID"]
26278    pub target_system: u8,
26279    #[doc = "Component ID"]
26280    pub target_component: u8,
26281    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26282    pub frame: MavFrame,
26283}
26284impl SAFETY_SET_ALLOWED_AREA_DATA {
26285    pub const ENCODED_LEN: usize = 27usize;
26286    pub const DEFAULT: Self = Self {
26287        p1x: 0.0_f32,
26288        p1y: 0.0_f32,
26289        p1z: 0.0_f32,
26290        p2x: 0.0_f32,
26291        p2y: 0.0_f32,
26292        p2z: 0.0_f32,
26293        target_system: 0_u8,
26294        target_component: 0_u8,
26295        frame: MavFrame::DEFAULT,
26296    };
26297    #[cfg(feature = "arbitrary")]
26298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26299        use arbitrary::{Arbitrary, Unstructured};
26300        let mut buf = [0u8; 1024];
26301        rng.fill_bytes(&mut buf);
26302        let mut unstructured = Unstructured::new(&buf);
26303        Self::arbitrary(&mut unstructured).unwrap_or_default()
26304    }
26305}
26306impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26307    fn default() -> Self {
26308        Self::DEFAULT.clone()
26309    }
26310}
26311impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26312    type Message = MavMessage;
26313    const ID: u32 = 54u32;
26314    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26315    const EXTRA_CRC: u8 = 15u8;
26316    const ENCODED_LEN: usize = 27usize;
26317    fn deser(
26318        _version: MavlinkVersion,
26319        __input: &[u8],
26320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26321        let avail_len = __input.len();
26322        let mut payload_buf = [0; Self::ENCODED_LEN];
26323        let mut buf = if avail_len < Self::ENCODED_LEN {
26324            payload_buf[0..avail_len].copy_from_slice(__input);
26325            Bytes::new(&payload_buf)
26326        } else {
26327            Bytes::new(__input)
26328        };
26329        let mut __struct = Self::default();
26330        __struct.p1x = buf.get_f32_le();
26331        __struct.p1y = buf.get_f32_le();
26332        __struct.p1z = buf.get_f32_le();
26333        __struct.p2x = buf.get_f32_le();
26334        __struct.p2y = buf.get_f32_le();
26335        __struct.p2z = buf.get_f32_le();
26336        __struct.target_system = buf.get_u8();
26337        __struct.target_component = buf.get_u8();
26338        let tmp = buf.get_u8();
26339        __struct.frame =
26340            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26341                enum_type: "MavFrame",
26342                value: tmp as u32,
26343            })?;
26344        Ok(__struct)
26345    }
26346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26347        let mut __tmp = BytesMut::new(bytes);
26348        #[allow(clippy::absurd_extreme_comparisons)]
26349        #[allow(unused_comparisons)]
26350        if __tmp.remaining() < Self::ENCODED_LEN {
26351            panic!(
26352                "buffer is too small (need {} bytes, but got {})",
26353                Self::ENCODED_LEN,
26354                __tmp.remaining(),
26355            )
26356        }
26357        __tmp.put_f32_le(self.p1x);
26358        __tmp.put_f32_le(self.p1y);
26359        __tmp.put_f32_le(self.p1z);
26360        __tmp.put_f32_le(self.p2x);
26361        __tmp.put_f32_le(self.p2y);
26362        __tmp.put_f32_le(self.p2z);
26363        __tmp.put_u8(self.target_system);
26364        __tmp.put_u8(self.target_component);
26365        __tmp.put_u8(self.frame as u8);
26366        if matches!(version, MavlinkVersion::V2) {
26367            let len = __tmp.len();
26368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26369        } else {
26370            __tmp.len()
26371        }
26372    }
26373}
26374#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26375#[doc = ""]
26376#[doc = "ID: 26"]
26377#[derive(Debug, Clone, PartialEq)]
26378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26380#[cfg_attr(feature = "ts", derive(TS))]
26381#[cfg_attr(feature = "ts", ts(export))]
26382pub struct SCALED_IMU_DATA {
26383    #[doc = "Timestamp (time since system boot)."]
26384    pub time_boot_ms: u32,
26385    #[doc = "X acceleration"]
26386    pub xacc: i16,
26387    #[doc = "Y acceleration"]
26388    pub yacc: i16,
26389    #[doc = "Z acceleration"]
26390    pub zacc: i16,
26391    #[doc = "Angular speed around X axis"]
26392    pub xgyro: i16,
26393    #[doc = "Angular speed around Y axis"]
26394    pub ygyro: i16,
26395    #[doc = "Angular speed around Z axis"]
26396    pub zgyro: i16,
26397    #[doc = "X Magnetic field"]
26398    pub xmag: i16,
26399    #[doc = "Y Magnetic field"]
26400    pub ymag: i16,
26401    #[doc = "Z Magnetic field"]
26402    pub zmag: i16,
26403    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26405    pub temperature: i16,
26406}
26407impl SCALED_IMU_DATA {
26408    pub const ENCODED_LEN: usize = 24usize;
26409    pub const DEFAULT: Self = Self {
26410        time_boot_ms: 0_u32,
26411        xacc: 0_i16,
26412        yacc: 0_i16,
26413        zacc: 0_i16,
26414        xgyro: 0_i16,
26415        ygyro: 0_i16,
26416        zgyro: 0_i16,
26417        xmag: 0_i16,
26418        ymag: 0_i16,
26419        zmag: 0_i16,
26420        temperature: 0_i16,
26421    };
26422    #[cfg(feature = "arbitrary")]
26423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26424        use arbitrary::{Arbitrary, Unstructured};
26425        let mut buf = [0u8; 1024];
26426        rng.fill_bytes(&mut buf);
26427        let mut unstructured = Unstructured::new(&buf);
26428        Self::arbitrary(&mut unstructured).unwrap_or_default()
26429    }
26430}
26431impl Default for SCALED_IMU_DATA {
26432    fn default() -> Self {
26433        Self::DEFAULT.clone()
26434    }
26435}
26436impl MessageData for SCALED_IMU_DATA {
26437    type Message = MavMessage;
26438    const ID: u32 = 26u32;
26439    const NAME: &'static str = "SCALED_IMU";
26440    const EXTRA_CRC: u8 = 170u8;
26441    const ENCODED_LEN: usize = 24usize;
26442    fn deser(
26443        _version: MavlinkVersion,
26444        __input: &[u8],
26445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26446        let avail_len = __input.len();
26447        let mut payload_buf = [0; Self::ENCODED_LEN];
26448        let mut buf = if avail_len < Self::ENCODED_LEN {
26449            payload_buf[0..avail_len].copy_from_slice(__input);
26450            Bytes::new(&payload_buf)
26451        } else {
26452            Bytes::new(__input)
26453        };
26454        let mut __struct = Self::default();
26455        __struct.time_boot_ms = buf.get_u32_le();
26456        __struct.xacc = buf.get_i16_le();
26457        __struct.yacc = buf.get_i16_le();
26458        __struct.zacc = buf.get_i16_le();
26459        __struct.xgyro = buf.get_i16_le();
26460        __struct.ygyro = buf.get_i16_le();
26461        __struct.zgyro = buf.get_i16_le();
26462        __struct.xmag = buf.get_i16_le();
26463        __struct.ymag = buf.get_i16_le();
26464        __struct.zmag = buf.get_i16_le();
26465        __struct.temperature = buf.get_i16_le();
26466        Ok(__struct)
26467    }
26468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26469        let mut __tmp = BytesMut::new(bytes);
26470        #[allow(clippy::absurd_extreme_comparisons)]
26471        #[allow(unused_comparisons)]
26472        if __tmp.remaining() < Self::ENCODED_LEN {
26473            panic!(
26474                "buffer is too small (need {} bytes, but got {})",
26475                Self::ENCODED_LEN,
26476                __tmp.remaining(),
26477            )
26478        }
26479        __tmp.put_u32_le(self.time_boot_ms);
26480        __tmp.put_i16_le(self.xacc);
26481        __tmp.put_i16_le(self.yacc);
26482        __tmp.put_i16_le(self.zacc);
26483        __tmp.put_i16_le(self.xgyro);
26484        __tmp.put_i16_le(self.ygyro);
26485        __tmp.put_i16_le(self.zgyro);
26486        __tmp.put_i16_le(self.xmag);
26487        __tmp.put_i16_le(self.ymag);
26488        __tmp.put_i16_le(self.zmag);
26489        if matches!(version, MavlinkVersion::V2) {
26490            __tmp.put_i16_le(self.temperature);
26491            let len = __tmp.len();
26492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26493        } else {
26494            __tmp.len()
26495        }
26496    }
26497}
26498#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26499#[doc = ""]
26500#[doc = "ID: 116"]
26501#[derive(Debug, Clone, PartialEq)]
26502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26504#[cfg_attr(feature = "ts", derive(TS))]
26505#[cfg_attr(feature = "ts", ts(export))]
26506pub struct SCALED_IMU2_DATA {
26507    #[doc = "Timestamp (time since system boot)."]
26508    pub time_boot_ms: u32,
26509    #[doc = "X acceleration"]
26510    pub xacc: i16,
26511    #[doc = "Y acceleration"]
26512    pub yacc: i16,
26513    #[doc = "Z acceleration"]
26514    pub zacc: i16,
26515    #[doc = "Angular speed around X axis"]
26516    pub xgyro: i16,
26517    #[doc = "Angular speed around Y axis"]
26518    pub ygyro: i16,
26519    #[doc = "Angular speed around Z axis"]
26520    pub zgyro: i16,
26521    #[doc = "X Magnetic field"]
26522    pub xmag: i16,
26523    #[doc = "Y Magnetic field"]
26524    pub ymag: i16,
26525    #[doc = "Z Magnetic field"]
26526    pub zmag: i16,
26527    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26528    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26529    pub temperature: i16,
26530}
26531impl SCALED_IMU2_DATA {
26532    pub const ENCODED_LEN: usize = 24usize;
26533    pub const DEFAULT: Self = Self {
26534        time_boot_ms: 0_u32,
26535        xacc: 0_i16,
26536        yacc: 0_i16,
26537        zacc: 0_i16,
26538        xgyro: 0_i16,
26539        ygyro: 0_i16,
26540        zgyro: 0_i16,
26541        xmag: 0_i16,
26542        ymag: 0_i16,
26543        zmag: 0_i16,
26544        temperature: 0_i16,
26545    };
26546    #[cfg(feature = "arbitrary")]
26547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26548        use arbitrary::{Arbitrary, Unstructured};
26549        let mut buf = [0u8; 1024];
26550        rng.fill_bytes(&mut buf);
26551        let mut unstructured = Unstructured::new(&buf);
26552        Self::arbitrary(&mut unstructured).unwrap_or_default()
26553    }
26554}
26555impl Default for SCALED_IMU2_DATA {
26556    fn default() -> Self {
26557        Self::DEFAULT.clone()
26558    }
26559}
26560impl MessageData for SCALED_IMU2_DATA {
26561    type Message = MavMessage;
26562    const ID: u32 = 116u32;
26563    const NAME: &'static str = "SCALED_IMU2";
26564    const EXTRA_CRC: u8 = 76u8;
26565    const ENCODED_LEN: usize = 24usize;
26566    fn deser(
26567        _version: MavlinkVersion,
26568        __input: &[u8],
26569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26570        let avail_len = __input.len();
26571        let mut payload_buf = [0; Self::ENCODED_LEN];
26572        let mut buf = if avail_len < Self::ENCODED_LEN {
26573            payload_buf[0..avail_len].copy_from_slice(__input);
26574            Bytes::new(&payload_buf)
26575        } else {
26576            Bytes::new(__input)
26577        };
26578        let mut __struct = Self::default();
26579        __struct.time_boot_ms = buf.get_u32_le();
26580        __struct.xacc = buf.get_i16_le();
26581        __struct.yacc = buf.get_i16_le();
26582        __struct.zacc = buf.get_i16_le();
26583        __struct.xgyro = buf.get_i16_le();
26584        __struct.ygyro = buf.get_i16_le();
26585        __struct.zgyro = buf.get_i16_le();
26586        __struct.xmag = buf.get_i16_le();
26587        __struct.ymag = buf.get_i16_le();
26588        __struct.zmag = buf.get_i16_le();
26589        __struct.temperature = buf.get_i16_le();
26590        Ok(__struct)
26591    }
26592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26593        let mut __tmp = BytesMut::new(bytes);
26594        #[allow(clippy::absurd_extreme_comparisons)]
26595        #[allow(unused_comparisons)]
26596        if __tmp.remaining() < Self::ENCODED_LEN {
26597            panic!(
26598                "buffer is too small (need {} bytes, but got {})",
26599                Self::ENCODED_LEN,
26600                __tmp.remaining(),
26601            )
26602        }
26603        __tmp.put_u32_le(self.time_boot_ms);
26604        __tmp.put_i16_le(self.xacc);
26605        __tmp.put_i16_le(self.yacc);
26606        __tmp.put_i16_le(self.zacc);
26607        __tmp.put_i16_le(self.xgyro);
26608        __tmp.put_i16_le(self.ygyro);
26609        __tmp.put_i16_le(self.zgyro);
26610        __tmp.put_i16_le(self.xmag);
26611        __tmp.put_i16_le(self.ymag);
26612        __tmp.put_i16_le(self.zmag);
26613        if matches!(version, MavlinkVersion::V2) {
26614            __tmp.put_i16_le(self.temperature);
26615            let len = __tmp.len();
26616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26617        } else {
26618            __tmp.len()
26619        }
26620    }
26621}
26622#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26623#[doc = ""]
26624#[doc = "ID: 129"]
26625#[derive(Debug, Clone, PartialEq)]
26626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26628#[cfg_attr(feature = "ts", derive(TS))]
26629#[cfg_attr(feature = "ts", ts(export))]
26630pub struct SCALED_IMU3_DATA {
26631    #[doc = "Timestamp (time since system boot)."]
26632    pub time_boot_ms: u32,
26633    #[doc = "X acceleration"]
26634    pub xacc: i16,
26635    #[doc = "Y acceleration"]
26636    pub yacc: i16,
26637    #[doc = "Z acceleration"]
26638    pub zacc: i16,
26639    #[doc = "Angular speed around X axis"]
26640    pub xgyro: i16,
26641    #[doc = "Angular speed around Y axis"]
26642    pub ygyro: i16,
26643    #[doc = "Angular speed around Z axis"]
26644    pub zgyro: i16,
26645    #[doc = "X Magnetic field"]
26646    pub xmag: i16,
26647    #[doc = "Y Magnetic field"]
26648    pub ymag: i16,
26649    #[doc = "Z Magnetic field"]
26650    pub zmag: i16,
26651    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26653    pub temperature: i16,
26654}
26655impl SCALED_IMU3_DATA {
26656    pub const ENCODED_LEN: usize = 24usize;
26657    pub const DEFAULT: Self = Self {
26658        time_boot_ms: 0_u32,
26659        xacc: 0_i16,
26660        yacc: 0_i16,
26661        zacc: 0_i16,
26662        xgyro: 0_i16,
26663        ygyro: 0_i16,
26664        zgyro: 0_i16,
26665        xmag: 0_i16,
26666        ymag: 0_i16,
26667        zmag: 0_i16,
26668        temperature: 0_i16,
26669    };
26670    #[cfg(feature = "arbitrary")]
26671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26672        use arbitrary::{Arbitrary, Unstructured};
26673        let mut buf = [0u8; 1024];
26674        rng.fill_bytes(&mut buf);
26675        let mut unstructured = Unstructured::new(&buf);
26676        Self::arbitrary(&mut unstructured).unwrap_or_default()
26677    }
26678}
26679impl Default for SCALED_IMU3_DATA {
26680    fn default() -> Self {
26681        Self::DEFAULT.clone()
26682    }
26683}
26684impl MessageData for SCALED_IMU3_DATA {
26685    type Message = MavMessage;
26686    const ID: u32 = 129u32;
26687    const NAME: &'static str = "SCALED_IMU3";
26688    const EXTRA_CRC: u8 = 46u8;
26689    const ENCODED_LEN: usize = 24usize;
26690    fn deser(
26691        _version: MavlinkVersion,
26692        __input: &[u8],
26693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26694        let avail_len = __input.len();
26695        let mut payload_buf = [0; Self::ENCODED_LEN];
26696        let mut buf = if avail_len < Self::ENCODED_LEN {
26697            payload_buf[0..avail_len].copy_from_slice(__input);
26698            Bytes::new(&payload_buf)
26699        } else {
26700            Bytes::new(__input)
26701        };
26702        let mut __struct = Self::default();
26703        __struct.time_boot_ms = buf.get_u32_le();
26704        __struct.xacc = buf.get_i16_le();
26705        __struct.yacc = buf.get_i16_le();
26706        __struct.zacc = buf.get_i16_le();
26707        __struct.xgyro = buf.get_i16_le();
26708        __struct.ygyro = buf.get_i16_le();
26709        __struct.zgyro = buf.get_i16_le();
26710        __struct.xmag = buf.get_i16_le();
26711        __struct.ymag = buf.get_i16_le();
26712        __struct.zmag = buf.get_i16_le();
26713        __struct.temperature = buf.get_i16_le();
26714        Ok(__struct)
26715    }
26716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26717        let mut __tmp = BytesMut::new(bytes);
26718        #[allow(clippy::absurd_extreme_comparisons)]
26719        #[allow(unused_comparisons)]
26720        if __tmp.remaining() < Self::ENCODED_LEN {
26721            panic!(
26722                "buffer is too small (need {} bytes, but got {})",
26723                Self::ENCODED_LEN,
26724                __tmp.remaining(),
26725            )
26726        }
26727        __tmp.put_u32_le(self.time_boot_ms);
26728        __tmp.put_i16_le(self.xacc);
26729        __tmp.put_i16_le(self.yacc);
26730        __tmp.put_i16_le(self.zacc);
26731        __tmp.put_i16_le(self.xgyro);
26732        __tmp.put_i16_le(self.ygyro);
26733        __tmp.put_i16_le(self.zgyro);
26734        __tmp.put_i16_le(self.xmag);
26735        __tmp.put_i16_le(self.ymag);
26736        __tmp.put_i16_le(self.zmag);
26737        if matches!(version, MavlinkVersion::V2) {
26738            __tmp.put_i16_le(self.temperature);
26739            let len = __tmp.len();
26740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26741        } else {
26742            __tmp.len()
26743        }
26744    }
26745}
26746#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26747#[doc = ""]
26748#[doc = "ID: 29"]
26749#[derive(Debug, Clone, PartialEq)]
26750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26752#[cfg_attr(feature = "ts", derive(TS))]
26753#[cfg_attr(feature = "ts", ts(export))]
26754pub struct SCALED_PRESSURE_DATA {
26755    #[doc = "Timestamp (time since system boot)."]
26756    pub time_boot_ms: u32,
26757    #[doc = "Absolute pressure"]
26758    pub press_abs: f32,
26759    #[doc = "Differential pressure 1"]
26760    pub press_diff: f32,
26761    #[doc = "Absolute pressure temperature"]
26762    pub temperature: i16,
26763    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26764    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26765    pub temperature_press_diff: i16,
26766}
26767impl SCALED_PRESSURE_DATA {
26768    pub const ENCODED_LEN: usize = 16usize;
26769    pub const DEFAULT: Self = Self {
26770        time_boot_ms: 0_u32,
26771        press_abs: 0.0_f32,
26772        press_diff: 0.0_f32,
26773        temperature: 0_i16,
26774        temperature_press_diff: 0_i16,
26775    };
26776    #[cfg(feature = "arbitrary")]
26777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26778        use arbitrary::{Arbitrary, Unstructured};
26779        let mut buf = [0u8; 1024];
26780        rng.fill_bytes(&mut buf);
26781        let mut unstructured = Unstructured::new(&buf);
26782        Self::arbitrary(&mut unstructured).unwrap_or_default()
26783    }
26784}
26785impl Default for SCALED_PRESSURE_DATA {
26786    fn default() -> Self {
26787        Self::DEFAULT.clone()
26788    }
26789}
26790impl MessageData for SCALED_PRESSURE_DATA {
26791    type Message = MavMessage;
26792    const ID: u32 = 29u32;
26793    const NAME: &'static str = "SCALED_PRESSURE";
26794    const EXTRA_CRC: u8 = 115u8;
26795    const ENCODED_LEN: usize = 16usize;
26796    fn deser(
26797        _version: MavlinkVersion,
26798        __input: &[u8],
26799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26800        let avail_len = __input.len();
26801        let mut payload_buf = [0; Self::ENCODED_LEN];
26802        let mut buf = if avail_len < Self::ENCODED_LEN {
26803            payload_buf[0..avail_len].copy_from_slice(__input);
26804            Bytes::new(&payload_buf)
26805        } else {
26806            Bytes::new(__input)
26807        };
26808        let mut __struct = Self::default();
26809        __struct.time_boot_ms = buf.get_u32_le();
26810        __struct.press_abs = buf.get_f32_le();
26811        __struct.press_diff = buf.get_f32_le();
26812        __struct.temperature = buf.get_i16_le();
26813        __struct.temperature_press_diff = buf.get_i16_le();
26814        Ok(__struct)
26815    }
26816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26817        let mut __tmp = BytesMut::new(bytes);
26818        #[allow(clippy::absurd_extreme_comparisons)]
26819        #[allow(unused_comparisons)]
26820        if __tmp.remaining() < Self::ENCODED_LEN {
26821            panic!(
26822                "buffer is too small (need {} bytes, but got {})",
26823                Self::ENCODED_LEN,
26824                __tmp.remaining(),
26825            )
26826        }
26827        __tmp.put_u32_le(self.time_boot_ms);
26828        __tmp.put_f32_le(self.press_abs);
26829        __tmp.put_f32_le(self.press_diff);
26830        __tmp.put_i16_le(self.temperature);
26831        if matches!(version, MavlinkVersion::V2) {
26832            __tmp.put_i16_le(self.temperature_press_diff);
26833            let len = __tmp.len();
26834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26835        } else {
26836            __tmp.len()
26837        }
26838    }
26839}
26840#[doc = "Barometer readings for 2nd barometer."]
26841#[doc = ""]
26842#[doc = "ID: 137"]
26843#[derive(Debug, Clone, PartialEq)]
26844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26846#[cfg_attr(feature = "ts", derive(TS))]
26847#[cfg_attr(feature = "ts", ts(export))]
26848pub struct SCALED_PRESSURE2_DATA {
26849    #[doc = "Timestamp (time since system boot)."]
26850    pub time_boot_ms: u32,
26851    #[doc = "Absolute pressure"]
26852    pub press_abs: f32,
26853    #[doc = "Differential pressure"]
26854    pub press_diff: f32,
26855    #[doc = "Absolute pressure temperature"]
26856    pub temperature: i16,
26857    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26859    pub temperature_press_diff: i16,
26860}
26861impl SCALED_PRESSURE2_DATA {
26862    pub const ENCODED_LEN: usize = 16usize;
26863    pub const DEFAULT: Self = Self {
26864        time_boot_ms: 0_u32,
26865        press_abs: 0.0_f32,
26866        press_diff: 0.0_f32,
26867        temperature: 0_i16,
26868        temperature_press_diff: 0_i16,
26869    };
26870    #[cfg(feature = "arbitrary")]
26871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26872        use arbitrary::{Arbitrary, Unstructured};
26873        let mut buf = [0u8; 1024];
26874        rng.fill_bytes(&mut buf);
26875        let mut unstructured = Unstructured::new(&buf);
26876        Self::arbitrary(&mut unstructured).unwrap_or_default()
26877    }
26878}
26879impl Default for SCALED_PRESSURE2_DATA {
26880    fn default() -> Self {
26881        Self::DEFAULT.clone()
26882    }
26883}
26884impl MessageData for SCALED_PRESSURE2_DATA {
26885    type Message = MavMessage;
26886    const ID: u32 = 137u32;
26887    const NAME: &'static str = "SCALED_PRESSURE2";
26888    const EXTRA_CRC: u8 = 195u8;
26889    const ENCODED_LEN: usize = 16usize;
26890    fn deser(
26891        _version: MavlinkVersion,
26892        __input: &[u8],
26893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26894        let avail_len = __input.len();
26895        let mut payload_buf = [0; Self::ENCODED_LEN];
26896        let mut buf = if avail_len < Self::ENCODED_LEN {
26897            payload_buf[0..avail_len].copy_from_slice(__input);
26898            Bytes::new(&payload_buf)
26899        } else {
26900            Bytes::new(__input)
26901        };
26902        let mut __struct = Self::default();
26903        __struct.time_boot_ms = buf.get_u32_le();
26904        __struct.press_abs = buf.get_f32_le();
26905        __struct.press_diff = buf.get_f32_le();
26906        __struct.temperature = buf.get_i16_le();
26907        __struct.temperature_press_diff = buf.get_i16_le();
26908        Ok(__struct)
26909    }
26910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26911        let mut __tmp = BytesMut::new(bytes);
26912        #[allow(clippy::absurd_extreme_comparisons)]
26913        #[allow(unused_comparisons)]
26914        if __tmp.remaining() < Self::ENCODED_LEN {
26915            panic!(
26916                "buffer is too small (need {} bytes, but got {})",
26917                Self::ENCODED_LEN,
26918                __tmp.remaining(),
26919            )
26920        }
26921        __tmp.put_u32_le(self.time_boot_ms);
26922        __tmp.put_f32_le(self.press_abs);
26923        __tmp.put_f32_le(self.press_diff);
26924        __tmp.put_i16_le(self.temperature);
26925        if matches!(version, MavlinkVersion::V2) {
26926            __tmp.put_i16_le(self.temperature_press_diff);
26927            let len = __tmp.len();
26928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26929        } else {
26930            __tmp.len()
26931        }
26932    }
26933}
26934#[doc = "Barometer readings for 3rd barometer."]
26935#[doc = ""]
26936#[doc = "ID: 143"]
26937#[derive(Debug, Clone, PartialEq)]
26938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26940#[cfg_attr(feature = "ts", derive(TS))]
26941#[cfg_attr(feature = "ts", ts(export))]
26942pub struct SCALED_PRESSURE3_DATA {
26943    #[doc = "Timestamp (time since system boot)."]
26944    pub time_boot_ms: u32,
26945    #[doc = "Absolute pressure"]
26946    pub press_abs: f32,
26947    #[doc = "Differential pressure"]
26948    pub press_diff: f32,
26949    #[doc = "Absolute pressure temperature"]
26950    pub temperature: i16,
26951    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26953    pub temperature_press_diff: i16,
26954}
26955impl SCALED_PRESSURE3_DATA {
26956    pub const ENCODED_LEN: usize = 16usize;
26957    pub const DEFAULT: Self = Self {
26958        time_boot_ms: 0_u32,
26959        press_abs: 0.0_f32,
26960        press_diff: 0.0_f32,
26961        temperature: 0_i16,
26962        temperature_press_diff: 0_i16,
26963    };
26964    #[cfg(feature = "arbitrary")]
26965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26966        use arbitrary::{Arbitrary, Unstructured};
26967        let mut buf = [0u8; 1024];
26968        rng.fill_bytes(&mut buf);
26969        let mut unstructured = Unstructured::new(&buf);
26970        Self::arbitrary(&mut unstructured).unwrap_or_default()
26971    }
26972}
26973impl Default for SCALED_PRESSURE3_DATA {
26974    fn default() -> Self {
26975        Self::DEFAULT.clone()
26976    }
26977}
26978impl MessageData for SCALED_PRESSURE3_DATA {
26979    type Message = MavMessage;
26980    const ID: u32 = 143u32;
26981    const NAME: &'static str = "SCALED_PRESSURE3";
26982    const EXTRA_CRC: u8 = 131u8;
26983    const ENCODED_LEN: usize = 16usize;
26984    fn deser(
26985        _version: MavlinkVersion,
26986        __input: &[u8],
26987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26988        let avail_len = __input.len();
26989        let mut payload_buf = [0; Self::ENCODED_LEN];
26990        let mut buf = if avail_len < Self::ENCODED_LEN {
26991            payload_buf[0..avail_len].copy_from_slice(__input);
26992            Bytes::new(&payload_buf)
26993        } else {
26994            Bytes::new(__input)
26995        };
26996        let mut __struct = Self::default();
26997        __struct.time_boot_ms = buf.get_u32_le();
26998        __struct.press_abs = buf.get_f32_le();
26999        __struct.press_diff = buf.get_f32_le();
27000        __struct.temperature = buf.get_i16_le();
27001        __struct.temperature_press_diff = buf.get_i16_le();
27002        Ok(__struct)
27003    }
27004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27005        let mut __tmp = BytesMut::new(bytes);
27006        #[allow(clippy::absurd_extreme_comparisons)]
27007        #[allow(unused_comparisons)]
27008        if __tmp.remaining() < Self::ENCODED_LEN {
27009            panic!(
27010                "buffer is too small (need {} bytes, but got {})",
27011                Self::ENCODED_LEN,
27012                __tmp.remaining(),
27013            )
27014        }
27015        __tmp.put_u32_le(self.time_boot_ms);
27016        __tmp.put_f32_le(self.press_abs);
27017        __tmp.put_f32_le(self.press_diff);
27018        __tmp.put_i16_le(self.temperature);
27019        if matches!(version, MavlinkVersion::V2) {
27020            __tmp.put_i16_le(self.temperature_press_diff);
27021            let len = __tmp.len();
27022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27023        } else {
27024            __tmp.len()
27025        }
27026    }
27027}
27028#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27029#[doc = ""]
27030#[doc = "ID: 126"]
27031#[derive(Debug, Clone, PartialEq)]
27032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27034#[cfg_attr(feature = "ts", derive(TS))]
27035#[cfg_attr(feature = "ts", ts(export))]
27036pub struct SERIAL_CONTROL_DATA {
27037    #[doc = "Baudrate of transfer. Zero means no change."]
27038    pub baudrate: u32,
27039    #[doc = "Timeout for reply data"]
27040    pub timeout: u16,
27041    #[doc = "Serial control device type."]
27042    pub device: SerialControlDev,
27043    #[doc = "Bitmap of serial control flags."]
27044    pub flags: SerialControlFlag,
27045    #[doc = "how many bytes in this transfer"]
27046    pub count: u8,
27047    #[doc = "serial data"]
27048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27050    pub data: [u8; 70],
27051    #[doc = "System ID"]
27052    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27053    pub target_system: u8,
27054    #[doc = "Component ID"]
27055    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27056    pub target_component: u8,
27057}
27058impl SERIAL_CONTROL_DATA {
27059    pub const ENCODED_LEN: usize = 81usize;
27060    pub const DEFAULT: Self = Self {
27061        baudrate: 0_u32,
27062        timeout: 0_u16,
27063        device: SerialControlDev::DEFAULT,
27064        flags: SerialControlFlag::DEFAULT,
27065        count: 0_u8,
27066        data: [0_u8; 70usize],
27067        target_system: 0_u8,
27068        target_component: 0_u8,
27069    };
27070    #[cfg(feature = "arbitrary")]
27071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27072        use arbitrary::{Arbitrary, Unstructured};
27073        let mut buf = [0u8; 1024];
27074        rng.fill_bytes(&mut buf);
27075        let mut unstructured = Unstructured::new(&buf);
27076        Self::arbitrary(&mut unstructured).unwrap_or_default()
27077    }
27078}
27079impl Default for SERIAL_CONTROL_DATA {
27080    fn default() -> Self {
27081        Self::DEFAULT.clone()
27082    }
27083}
27084impl MessageData for SERIAL_CONTROL_DATA {
27085    type Message = MavMessage;
27086    const ID: u32 = 126u32;
27087    const NAME: &'static str = "SERIAL_CONTROL";
27088    const EXTRA_CRC: u8 = 220u8;
27089    const ENCODED_LEN: usize = 81usize;
27090    fn deser(
27091        _version: MavlinkVersion,
27092        __input: &[u8],
27093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27094        let avail_len = __input.len();
27095        let mut payload_buf = [0; Self::ENCODED_LEN];
27096        let mut buf = if avail_len < Self::ENCODED_LEN {
27097            payload_buf[0..avail_len].copy_from_slice(__input);
27098            Bytes::new(&payload_buf)
27099        } else {
27100            Bytes::new(__input)
27101        };
27102        let mut __struct = Self::default();
27103        __struct.baudrate = buf.get_u32_le();
27104        __struct.timeout = buf.get_u16_le();
27105        let tmp = buf.get_u8();
27106        __struct.device =
27107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27108                enum_type: "SerialControlDev",
27109                value: tmp as u32,
27110            })?;
27111        let tmp = buf.get_u8();
27112        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27113            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27114                flag_type: "SerialControlFlag",
27115                value: tmp as u32,
27116            })?;
27117        __struct.count = buf.get_u8();
27118        for v in &mut __struct.data {
27119            let val = buf.get_u8();
27120            *v = val;
27121        }
27122        __struct.target_system = buf.get_u8();
27123        __struct.target_component = buf.get_u8();
27124        Ok(__struct)
27125    }
27126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27127        let mut __tmp = BytesMut::new(bytes);
27128        #[allow(clippy::absurd_extreme_comparisons)]
27129        #[allow(unused_comparisons)]
27130        if __tmp.remaining() < Self::ENCODED_LEN {
27131            panic!(
27132                "buffer is too small (need {} bytes, but got {})",
27133                Self::ENCODED_LEN,
27134                __tmp.remaining(),
27135            )
27136        }
27137        __tmp.put_u32_le(self.baudrate);
27138        __tmp.put_u16_le(self.timeout);
27139        __tmp.put_u8(self.device as u8);
27140        __tmp.put_u8(self.flags.bits());
27141        __tmp.put_u8(self.count);
27142        for val in &self.data {
27143            __tmp.put_u8(*val);
27144        }
27145        if matches!(version, MavlinkVersion::V2) {
27146            __tmp.put_u8(self.target_system);
27147            __tmp.put_u8(self.target_component);
27148            let len = __tmp.len();
27149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27150        } else {
27151            __tmp.len()
27152        }
27153    }
27154}
27155#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27156#[doc = ""]
27157#[doc = "ID: 36"]
27158#[derive(Debug, Clone, PartialEq)]
27159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27161#[cfg_attr(feature = "ts", derive(TS))]
27162#[cfg_attr(feature = "ts", ts(export))]
27163pub struct SERVO_OUTPUT_RAW_DATA {
27164    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27165    pub time_usec: u32,
27166    #[doc = "Servo output 1 value"]
27167    pub servo1_raw: u16,
27168    #[doc = "Servo output 2 value"]
27169    pub servo2_raw: u16,
27170    #[doc = "Servo output 3 value"]
27171    pub servo3_raw: u16,
27172    #[doc = "Servo output 4 value"]
27173    pub servo4_raw: u16,
27174    #[doc = "Servo output 5 value"]
27175    pub servo5_raw: u16,
27176    #[doc = "Servo output 6 value"]
27177    pub servo6_raw: u16,
27178    #[doc = "Servo output 7 value"]
27179    pub servo7_raw: u16,
27180    #[doc = "Servo output 8 value"]
27181    pub servo8_raw: u16,
27182    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27183    pub port: u8,
27184    #[doc = "Servo output 9 value"]
27185    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27186    pub servo9_raw: u16,
27187    #[doc = "Servo output 10 value"]
27188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27189    pub servo10_raw: u16,
27190    #[doc = "Servo output 11 value"]
27191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27192    pub servo11_raw: u16,
27193    #[doc = "Servo output 12 value"]
27194    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27195    pub servo12_raw: u16,
27196    #[doc = "Servo output 13 value"]
27197    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27198    pub servo13_raw: u16,
27199    #[doc = "Servo output 14 value"]
27200    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27201    pub servo14_raw: u16,
27202    #[doc = "Servo output 15 value"]
27203    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27204    pub servo15_raw: u16,
27205    #[doc = "Servo output 16 value"]
27206    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27207    pub servo16_raw: u16,
27208}
27209impl SERVO_OUTPUT_RAW_DATA {
27210    pub const ENCODED_LEN: usize = 37usize;
27211    pub const DEFAULT: Self = Self {
27212        time_usec: 0_u32,
27213        servo1_raw: 0_u16,
27214        servo2_raw: 0_u16,
27215        servo3_raw: 0_u16,
27216        servo4_raw: 0_u16,
27217        servo5_raw: 0_u16,
27218        servo6_raw: 0_u16,
27219        servo7_raw: 0_u16,
27220        servo8_raw: 0_u16,
27221        port: 0_u8,
27222        servo9_raw: 0_u16,
27223        servo10_raw: 0_u16,
27224        servo11_raw: 0_u16,
27225        servo12_raw: 0_u16,
27226        servo13_raw: 0_u16,
27227        servo14_raw: 0_u16,
27228        servo15_raw: 0_u16,
27229        servo16_raw: 0_u16,
27230    };
27231    #[cfg(feature = "arbitrary")]
27232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27233        use arbitrary::{Arbitrary, Unstructured};
27234        let mut buf = [0u8; 1024];
27235        rng.fill_bytes(&mut buf);
27236        let mut unstructured = Unstructured::new(&buf);
27237        Self::arbitrary(&mut unstructured).unwrap_or_default()
27238    }
27239}
27240impl Default for SERVO_OUTPUT_RAW_DATA {
27241    fn default() -> Self {
27242        Self::DEFAULT.clone()
27243    }
27244}
27245impl MessageData for SERVO_OUTPUT_RAW_DATA {
27246    type Message = MavMessage;
27247    const ID: u32 = 36u32;
27248    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27249    const EXTRA_CRC: u8 = 222u8;
27250    const ENCODED_LEN: usize = 37usize;
27251    fn deser(
27252        _version: MavlinkVersion,
27253        __input: &[u8],
27254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27255        let avail_len = __input.len();
27256        let mut payload_buf = [0; Self::ENCODED_LEN];
27257        let mut buf = if avail_len < Self::ENCODED_LEN {
27258            payload_buf[0..avail_len].copy_from_slice(__input);
27259            Bytes::new(&payload_buf)
27260        } else {
27261            Bytes::new(__input)
27262        };
27263        let mut __struct = Self::default();
27264        __struct.time_usec = buf.get_u32_le();
27265        __struct.servo1_raw = buf.get_u16_le();
27266        __struct.servo2_raw = buf.get_u16_le();
27267        __struct.servo3_raw = buf.get_u16_le();
27268        __struct.servo4_raw = buf.get_u16_le();
27269        __struct.servo5_raw = buf.get_u16_le();
27270        __struct.servo6_raw = buf.get_u16_le();
27271        __struct.servo7_raw = buf.get_u16_le();
27272        __struct.servo8_raw = buf.get_u16_le();
27273        __struct.port = buf.get_u8();
27274        __struct.servo9_raw = buf.get_u16_le();
27275        __struct.servo10_raw = buf.get_u16_le();
27276        __struct.servo11_raw = buf.get_u16_le();
27277        __struct.servo12_raw = buf.get_u16_le();
27278        __struct.servo13_raw = buf.get_u16_le();
27279        __struct.servo14_raw = buf.get_u16_le();
27280        __struct.servo15_raw = buf.get_u16_le();
27281        __struct.servo16_raw = buf.get_u16_le();
27282        Ok(__struct)
27283    }
27284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27285        let mut __tmp = BytesMut::new(bytes);
27286        #[allow(clippy::absurd_extreme_comparisons)]
27287        #[allow(unused_comparisons)]
27288        if __tmp.remaining() < Self::ENCODED_LEN {
27289            panic!(
27290                "buffer is too small (need {} bytes, but got {})",
27291                Self::ENCODED_LEN,
27292                __tmp.remaining(),
27293            )
27294        }
27295        __tmp.put_u32_le(self.time_usec);
27296        __tmp.put_u16_le(self.servo1_raw);
27297        __tmp.put_u16_le(self.servo2_raw);
27298        __tmp.put_u16_le(self.servo3_raw);
27299        __tmp.put_u16_le(self.servo4_raw);
27300        __tmp.put_u16_le(self.servo5_raw);
27301        __tmp.put_u16_le(self.servo6_raw);
27302        __tmp.put_u16_le(self.servo7_raw);
27303        __tmp.put_u16_le(self.servo8_raw);
27304        __tmp.put_u8(self.port);
27305        if matches!(version, MavlinkVersion::V2) {
27306            __tmp.put_u16_le(self.servo9_raw);
27307            __tmp.put_u16_le(self.servo10_raw);
27308            __tmp.put_u16_le(self.servo11_raw);
27309            __tmp.put_u16_le(self.servo12_raw);
27310            __tmp.put_u16_le(self.servo13_raw);
27311            __tmp.put_u16_le(self.servo14_raw);
27312            __tmp.put_u16_le(self.servo15_raw);
27313            __tmp.put_u16_le(self.servo16_raw);
27314            let len = __tmp.len();
27315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27316        } else {
27317            __tmp.len()
27318        }
27319    }
27320}
27321#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27322#[doc = ""]
27323#[doc = "ID: 256"]
27324#[derive(Debug, Clone, PartialEq)]
27325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27327#[cfg_attr(feature = "ts", derive(TS))]
27328#[cfg_attr(feature = "ts", ts(export))]
27329pub struct SETUP_SIGNING_DATA {
27330    #[doc = "initial timestamp"]
27331    pub initial_timestamp: u64,
27332    #[doc = "system id of the target"]
27333    pub target_system: u8,
27334    #[doc = "component ID of the target"]
27335    pub target_component: u8,
27336    #[doc = "signing key"]
27337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27338    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27339    pub secret_key: [u8; 32],
27340}
27341impl SETUP_SIGNING_DATA {
27342    pub const ENCODED_LEN: usize = 42usize;
27343    pub const DEFAULT: Self = Self {
27344        initial_timestamp: 0_u64,
27345        target_system: 0_u8,
27346        target_component: 0_u8,
27347        secret_key: [0_u8; 32usize],
27348    };
27349    #[cfg(feature = "arbitrary")]
27350    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27351        use arbitrary::{Arbitrary, Unstructured};
27352        let mut buf = [0u8; 1024];
27353        rng.fill_bytes(&mut buf);
27354        let mut unstructured = Unstructured::new(&buf);
27355        Self::arbitrary(&mut unstructured).unwrap_or_default()
27356    }
27357}
27358impl Default for SETUP_SIGNING_DATA {
27359    fn default() -> Self {
27360        Self::DEFAULT.clone()
27361    }
27362}
27363impl MessageData for SETUP_SIGNING_DATA {
27364    type Message = MavMessage;
27365    const ID: u32 = 256u32;
27366    const NAME: &'static str = "SETUP_SIGNING";
27367    const EXTRA_CRC: u8 = 71u8;
27368    const ENCODED_LEN: usize = 42usize;
27369    fn deser(
27370        _version: MavlinkVersion,
27371        __input: &[u8],
27372    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27373        let avail_len = __input.len();
27374        let mut payload_buf = [0; Self::ENCODED_LEN];
27375        let mut buf = if avail_len < Self::ENCODED_LEN {
27376            payload_buf[0..avail_len].copy_from_slice(__input);
27377            Bytes::new(&payload_buf)
27378        } else {
27379            Bytes::new(__input)
27380        };
27381        let mut __struct = Self::default();
27382        __struct.initial_timestamp = buf.get_u64_le();
27383        __struct.target_system = buf.get_u8();
27384        __struct.target_component = buf.get_u8();
27385        for v in &mut __struct.secret_key {
27386            let val = buf.get_u8();
27387            *v = val;
27388        }
27389        Ok(__struct)
27390    }
27391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27392        let mut __tmp = BytesMut::new(bytes);
27393        #[allow(clippy::absurd_extreme_comparisons)]
27394        #[allow(unused_comparisons)]
27395        if __tmp.remaining() < Self::ENCODED_LEN {
27396            panic!(
27397                "buffer is too small (need {} bytes, but got {})",
27398                Self::ENCODED_LEN,
27399                __tmp.remaining(),
27400            )
27401        }
27402        __tmp.put_u64_le(self.initial_timestamp);
27403        __tmp.put_u8(self.target_system);
27404        __tmp.put_u8(self.target_component);
27405        for val in &self.secret_key {
27406            __tmp.put_u8(*val);
27407        }
27408        if matches!(version, MavlinkVersion::V2) {
27409            let len = __tmp.len();
27410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27411        } else {
27412            __tmp.len()
27413        }
27414    }
27415}
27416#[doc = "Set the vehicle attitude and body angular rates."]
27417#[doc = ""]
27418#[doc = "ID: 139"]
27419#[derive(Debug, Clone, PartialEq)]
27420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27422#[cfg_attr(feature = "ts", derive(TS))]
27423#[cfg_attr(feature = "ts", ts(export))]
27424pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27426    pub time_usec: u64,
27427    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27430    pub controls: [f32; 8],
27431    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27432    pub group_mlx: u8,
27433    #[doc = "System ID"]
27434    pub target_system: u8,
27435    #[doc = "Component ID"]
27436    pub target_component: u8,
27437}
27438impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27439    pub const ENCODED_LEN: usize = 43usize;
27440    pub const DEFAULT: Self = Self {
27441        time_usec: 0_u64,
27442        controls: [0.0_f32; 8usize],
27443        group_mlx: 0_u8,
27444        target_system: 0_u8,
27445        target_component: 0_u8,
27446    };
27447    #[cfg(feature = "arbitrary")]
27448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27449        use arbitrary::{Arbitrary, Unstructured};
27450        let mut buf = [0u8; 1024];
27451        rng.fill_bytes(&mut buf);
27452        let mut unstructured = Unstructured::new(&buf);
27453        Self::arbitrary(&mut unstructured).unwrap_or_default()
27454    }
27455}
27456impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27457    fn default() -> Self {
27458        Self::DEFAULT.clone()
27459    }
27460}
27461impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27462    type Message = MavMessage;
27463    const ID: u32 = 139u32;
27464    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27465    const EXTRA_CRC: u8 = 168u8;
27466    const ENCODED_LEN: usize = 43usize;
27467    fn deser(
27468        _version: MavlinkVersion,
27469        __input: &[u8],
27470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27471        let avail_len = __input.len();
27472        let mut payload_buf = [0; Self::ENCODED_LEN];
27473        let mut buf = if avail_len < Self::ENCODED_LEN {
27474            payload_buf[0..avail_len].copy_from_slice(__input);
27475            Bytes::new(&payload_buf)
27476        } else {
27477            Bytes::new(__input)
27478        };
27479        let mut __struct = Self::default();
27480        __struct.time_usec = buf.get_u64_le();
27481        for v in &mut __struct.controls {
27482            let val = buf.get_f32_le();
27483            *v = val;
27484        }
27485        __struct.group_mlx = buf.get_u8();
27486        __struct.target_system = buf.get_u8();
27487        __struct.target_component = buf.get_u8();
27488        Ok(__struct)
27489    }
27490    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27491        let mut __tmp = BytesMut::new(bytes);
27492        #[allow(clippy::absurd_extreme_comparisons)]
27493        #[allow(unused_comparisons)]
27494        if __tmp.remaining() < Self::ENCODED_LEN {
27495            panic!(
27496                "buffer is too small (need {} bytes, but got {})",
27497                Self::ENCODED_LEN,
27498                __tmp.remaining(),
27499            )
27500        }
27501        __tmp.put_u64_le(self.time_usec);
27502        for val in &self.controls {
27503            __tmp.put_f32_le(*val);
27504        }
27505        __tmp.put_u8(self.group_mlx);
27506        __tmp.put_u8(self.target_system);
27507        __tmp.put_u8(self.target_component);
27508        if matches!(version, MavlinkVersion::V2) {
27509            let len = __tmp.len();
27510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27511        } else {
27512            __tmp.len()
27513        }
27514    }
27515}
27516#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27517#[doc = ""]
27518#[doc = "ID: 82"]
27519#[derive(Debug, Clone, PartialEq)]
27520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27522#[cfg_attr(feature = "ts", derive(TS))]
27523#[cfg_attr(feature = "ts", ts(export))]
27524pub struct SET_ATTITUDE_TARGET_DATA {
27525    #[doc = "Timestamp (time since system boot)."]
27526    pub time_boot_ms: u32,
27527    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27529    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27530    pub q: [f32; 4],
27531    #[doc = "Body roll rate"]
27532    pub body_roll_rate: f32,
27533    #[doc = "Body pitch rate"]
27534    pub body_pitch_rate: f32,
27535    #[doc = "Body yaw rate"]
27536    pub body_yaw_rate: f32,
27537    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27538    pub thrust: f32,
27539    #[doc = "System ID"]
27540    pub target_system: u8,
27541    #[doc = "Component ID"]
27542    pub target_component: u8,
27543    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27544    pub type_mask: AttitudeTargetTypemask,
27545    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27546    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27547    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27548    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27549    pub thrust_body: [f32; 3],
27550}
27551impl SET_ATTITUDE_TARGET_DATA {
27552    pub const ENCODED_LEN: usize = 51usize;
27553    pub const DEFAULT: Self = Self {
27554        time_boot_ms: 0_u32,
27555        q: [0.0_f32; 4usize],
27556        body_roll_rate: 0.0_f32,
27557        body_pitch_rate: 0.0_f32,
27558        body_yaw_rate: 0.0_f32,
27559        thrust: 0.0_f32,
27560        target_system: 0_u8,
27561        target_component: 0_u8,
27562        type_mask: AttitudeTargetTypemask::DEFAULT,
27563        thrust_body: [0.0_f32; 3usize],
27564    };
27565    #[cfg(feature = "arbitrary")]
27566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27567        use arbitrary::{Arbitrary, Unstructured};
27568        let mut buf = [0u8; 1024];
27569        rng.fill_bytes(&mut buf);
27570        let mut unstructured = Unstructured::new(&buf);
27571        Self::arbitrary(&mut unstructured).unwrap_or_default()
27572    }
27573}
27574impl Default for SET_ATTITUDE_TARGET_DATA {
27575    fn default() -> Self {
27576        Self::DEFAULT.clone()
27577    }
27578}
27579impl MessageData for SET_ATTITUDE_TARGET_DATA {
27580    type Message = MavMessage;
27581    const ID: u32 = 82u32;
27582    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27583    const EXTRA_CRC: u8 = 49u8;
27584    const ENCODED_LEN: usize = 51usize;
27585    fn deser(
27586        _version: MavlinkVersion,
27587        __input: &[u8],
27588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27589        let avail_len = __input.len();
27590        let mut payload_buf = [0; Self::ENCODED_LEN];
27591        let mut buf = if avail_len < Self::ENCODED_LEN {
27592            payload_buf[0..avail_len].copy_from_slice(__input);
27593            Bytes::new(&payload_buf)
27594        } else {
27595            Bytes::new(__input)
27596        };
27597        let mut __struct = Self::default();
27598        __struct.time_boot_ms = buf.get_u32_le();
27599        for v in &mut __struct.q {
27600            let val = buf.get_f32_le();
27601            *v = val;
27602        }
27603        __struct.body_roll_rate = buf.get_f32_le();
27604        __struct.body_pitch_rate = buf.get_f32_le();
27605        __struct.body_yaw_rate = buf.get_f32_le();
27606        __struct.thrust = buf.get_f32_le();
27607        __struct.target_system = buf.get_u8();
27608        __struct.target_component = buf.get_u8();
27609        let tmp = buf.get_u8();
27610        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27611            tmp & AttitudeTargetTypemask::all().bits(),
27612        )
27613        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27614            flag_type: "AttitudeTargetTypemask",
27615            value: tmp as u32,
27616        })?;
27617        for v in &mut __struct.thrust_body {
27618            let val = buf.get_f32_le();
27619            *v = val;
27620        }
27621        Ok(__struct)
27622    }
27623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27624        let mut __tmp = BytesMut::new(bytes);
27625        #[allow(clippy::absurd_extreme_comparisons)]
27626        #[allow(unused_comparisons)]
27627        if __tmp.remaining() < Self::ENCODED_LEN {
27628            panic!(
27629                "buffer is too small (need {} bytes, but got {})",
27630                Self::ENCODED_LEN,
27631                __tmp.remaining(),
27632            )
27633        }
27634        __tmp.put_u32_le(self.time_boot_ms);
27635        for val in &self.q {
27636            __tmp.put_f32_le(*val);
27637        }
27638        __tmp.put_f32_le(self.body_roll_rate);
27639        __tmp.put_f32_le(self.body_pitch_rate);
27640        __tmp.put_f32_le(self.body_yaw_rate);
27641        __tmp.put_f32_le(self.thrust);
27642        __tmp.put_u8(self.target_system);
27643        __tmp.put_u8(self.target_component);
27644        __tmp.put_u8(self.type_mask.bits());
27645        if matches!(version, MavlinkVersion::V2) {
27646            for val in &self.thrust_body {
27647                __tmp.put_f32_le(*val);
27648            }
27649            let len = __tmp.len();
27650            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27651        } else {
27652            __tmp.len()
27653        }
27654    }
27655}
27656#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27657#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27658#[doc = ""]
27659#[doc = "ID: 48"]
27660#[derive(Debug, Clone, PartialEq)]
27661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27663#[cfg_attr(feature = "ts", derive(TS))]
27664#[cfg_attr(feature = "ts", ts(export))]
27665pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27666    #[doc = "Latitude (WGS84)"]
27667    pub latitude: i32,
27668    #[doc = "Longitude (WGS84)"]
27669    pub longitude: i32,
27670    #[doc = "Altitude (MSL). Positive for up."]
27671    pub altitude: i32,
27672    #[doc = "System ID"]
27673    pub target_system: u8,
27674    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27675    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27676    pub time_usec: u64,
27677}
27678impl SET_GPS_GLOBAL_ORIGIN_DATA {
27679    pub const ENCODED_LEN: usize = 21usize;
27680    pub const DEFAULT: Self = Self {
27681        latitude: 0_i32,
27682        longitude: 0_i32,
27683        altitude: 0_i32,
27684        target_system: 0_u8,
27685        time_usec: 0_u64,
27686    };
27687    #[cfg(feature = "arbitrary")]
27688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27689        use arbitrary::{Arbitrary, Unstructured};
27690        let mut buf = [0u8; 1024];
27691        rng.fill_bytes(&mut buf);
27692        let mut unstructured = Unstructured::new(&buf);
27693        Self::arbitrary(&mut unstructured).unwrap_or_default()
27694    }
27695}
27696impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27697    fn default() -> Self {
27698        Self::DEFAULT.clone()
27699    }
27700}
27701impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27702    type Message = MavMessage;
27703    const ID: u32 = 48u32;
27704    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27705    const EXTRA_CRC: u8 = 41u8;
27706    const ENCODED_LEN: usize = 21usize;
27707    fn deser(
27708        _version: MavlinkVersion,
27709        __input: &[u8],
27710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27711        let avail_len = __input.len();
27712        let mut payload_buf = [0; Self::ENCODED_LEN];
27713        let mut buf = if avail_len < Self::ENCODED_LEN {
27714            payload_buf[0..avail_len].copy_from_slice(__input);
27715            Bytes::new(&payload_buf)
27716        } else {
27717            Bytes::new(__input)
27718        };
27719        let mut __struct = Self::default();
27720        __struct.latitude = buf.get_i32_le();
27721        __struct.longitude = buf.get_i32_le();
27722        __struct.altitude = buf.get_i32_le();
27723        __struct.target_system = buf.get_u8();
27724        __struct.time_usec = buf.get_u64_le();
27725        Ok(__struct)
27726    }
27727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27728        let mut __tmp = BytesMut::new(bytes);
27729        #[allow(clippy::absurd_extreme_comparisons)]
27730        #[allow(unused_comparisons)]
27731        if __tmp.remaining() < Self::ENCODED_LEN {
27732            panic!(
27733                "buffer is too small (need {} bytes, but got {})",
27734                Self::ENCODED_LEN,
27735                __tmp.remaining(),
27736            )
27737        }
27738        __tmp.put_i32_le(self.latitude);
27739        __tmp.put_i32_le(self.longitude);
27740        __tmp.put_i32_le(self.altitude);
27741        __tmp.put_u8(self.target_system);
27742        if matches!(version, MavlinkVersion::V2) {
27743            __tmp.put_u64_le(self.time_usec);
27744            let len = __tmp.len();
27745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27746        } else {
27747            __tmp.len()
27748        }
27749    }
27750}
27751#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27752#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27753#[doc = ""]
27754#[doc = "ID: 243"]
27755#[derive(Debug, Clone, PartialEq)]
27756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27758#[cfg_attr(feature = "ts", derive(TS))]
27759#[cfg_attr(feature = "ts", ts(export))]
27760pub struct SET_HOME_POSITION_DATA {
27761    #[doc = "Latitude (WGS84)"]
27762    pub latitude: i32,
27763    #[doc = "Longitude (WGS84)"]
27764    pub longitude: i32,
27765    #[doc = "Altitude (MSL). Positive for up."]
27766    pub altitude: i32,
27767    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27768    pub x: f32,
27769    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27770    pub y: f32,
27771    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27772    pub z: f32,
27773    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27776    pub q: [f32; 4],
27777    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27778    pub approach_x: f32,
27779    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27780    pub approach_y: f32,
27781    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27782    pub approach_z: f32,
27783    #[doc = "System ID."]
27784    pub target_system: u8,
27785    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27787    pub time_usec: u64,
27788}
27789impl SET_HOME_POSITION_DATA {
27790    pub const ENCODED_LEN: usize = 61usize;
27791    pub const DEFAULT: Self = Self {
27792        latitude: 0_i32,
27793        longitude: 0_i32,
27794        altitude: 0_i32,
27795        x: 0.0_f32,
27796        y: 0.0_f32,
27797        z: 0.0_f32,
27798        q: [0.0_f32; 4usize],
27799        approach_x: 0.0_f32,
27800        approach_y: 0.0_f32,
27801        approach_z: 0.0_f32,
27802        target_system: 0_u8,
27803        time_usec: 0_u64,
27804    };
27805    #[cfg(feature = "arbitrary")]
27806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27807        use arbitrary::{Arbitrary, Unstructured};
27808        let mut buf = [0u8; 1024];
27809        rng.fill_bytes(&mut buf);
27810        let mut unstructured = Unstructured::new(&buf);
27811        Self::arbitrary(&mut unstructured).unwrap_or_default()
27812    }
27813}
27814impl Default for SET_HOME_POSITION_DATA {
27815    fn default() -> Self {
27816        Self::DEFAULT.clone()
27817    }
27818}
27819impl MessageData for SET_HOME_POSITION_DATA {
27820    type Message = MavMessage;
27821    const ID: u32 = 243u32;
27822    const NAME: &'static str = "SET_HOME_POSITION";
27823    const EXTRA_CRC: u8 = 85u8;
27824    const ENCODED_LEN: usize = 61usize;
27825    fn deser(
27826        _version: MavlinkVersion,
27827        __input: &[u8],
27828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27829        let avail_len = __input.len();
27830        let mut payload_buf = [0; Self::ENCODED_LEN];
27831        let mut buf = if avail_len < Self::ENCODED_LEN {
27832            payload_buf[0..avail_len].copy_from_slice(__input);
27833            Bytes::new(&payload_buf)
27834        } else {
27835            Bytes::new(__input)
27836        };
27837        let mut __struct = Self::default();
27838        __struct.latitude = buf.get_i32_le();
27839        __struct.longitude = buf.get_i32_le();
27840        __struct.altitude = buf.get_i32_le();
27841        __struct.x = buf.get_f32_le();
27842        __struct.y = buf.get_f32_le();
27843        __struct.z = buf.get_f32_le();
27844        for v in &mut __struct.q {
27845            let val = buf.get_f32_le();
27846            *v = val;
27847        }
27848        __struct.approach_x = buf.get_f32_le();
27849        __struct.approach_y = buf.get_f32_le();
27850        __struct.approach_z = buf.get_f32_le();
27851        __struct.target_system = buf.get_u8();
27852        __struct.time_usec = buf.get_u64_le();
27853        Ok(__struct)
27854    }
27855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27856        let mut __tmp = BytesMut::new(bytes);
27857        #[allow(clippy::absurd_extreme_comparisons)]
27858        #[allow(unused_comparisons)]
27859        if __tmp.remaining() < Self::ENCODED_LEN {
27860            panic!(
27861                "buffer is too small (need {} bytes, but got {})",
27862                Self::ENCODED_LEN,
27863                __tmp.remaining(),
27864            )
27865        }
27866        __tmp.put_i32_le(self.latitude);
27867        __tmp.put_i32_le(self.longitude);
27868        __tmp.put_i32_le(self.altitude);
27869        __tmp.put_f32_le(self.x);
27870        __tmp.put_f32_le(self.y);
27871        __tmp.put_f32_le(self.z);
27872        for val in &self.q {
27873            __tmp.put_f32_le(*val);
27874        }
27875        __tmp.put_f32_le(self.approach_x);
27876        __tmp.put_f32_le(self.approach_y);
27877        __tmp.put_f32_le(self.approach_z);
27878        __tmp.put_u8(self.target_system);
27879        if matches!(version, MavlinkVersion::V2) {
27880            __tmp.put_u64_le(self.time_usec);
27881            let len = __tmp.len();
27882            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27883        } else {
27884            __tmp.len()
27885        }
27886    }
27887}
27888#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27889#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27890#[doc = ""]
27891#[doc = "ID: 11"]
27892#[derive(Debug, Clone, PartialEq)]
27893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27895#[cfg_attr(feature = "ts", derive(TS))]
27896#[cfg_attr(feature = "ts", ts(export))]
27897pub struct SET_MODE_DATA {
27898    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27899    pub custom_mode: u32,
27900    #[doc = "The system setting the mode"]
27901    pub target_system: u8,
27902    #[doc = "The new base mode."]
27903    pub base_mode: MavMode,
27904}
27905impl SET_MODE_DATA {
27906    pub const ENCODED_LEN: usize = 6usize;
27907    pub const DEFAULT: Self = Self {
27908        custom_mode: 0_u32,
27909        target_system: 0_u8,
27910        base_mode: MavMode::DEFAULT,
27911    };
27912    #[cfg(feature = "arbitrary")]
27913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27914        use arbitrary::{Arbitrary, Unstructured};
27915        let mut buf = [0u8; 1024];
27916        rng.fill_bytes(&mut buf);
27917        let mut unstructured = Unstructured::new(&buf);
27918        Self::arbitrary(&mut unstructured).unwrap_or_default()
27919    }
27920}
27921impl Default for SET_MODE_DATA {
27922    fn default() -> Self {
27923        Self::DEFAULT.clone()
27924    }
27925}
27926impl MessageData for SET_MODE_DATA {
27927    type Message = MavMessage;
27928    const ID: u32 = 11u32;
27929    const NAME: &'static str = "SET_MODE";
27930    const EXTRA_CRC: u8 = 89u8;
27931    const ENCODED_LEN: usize = 6usize;
27932    fn deser(
27933        _version: MavlinkVersion,
27934        __input: &[u8],
27935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27936        let avail_len = __input.len();
27937        let mut payload_buf = [0; Self::ENCODED_LEN];
27938        let mut buf = if avail_len < Self::ENCODED_LEN {
27939            payload_buf[0..avail_len].copy_from_slice(__input);
27940            Bytes::new(&payload_buf)
27941        } else {
27942            Bytes::new(__input)
27943        };
27944        let mut __struct = Self::default();
27945        __struct.custom_mode = buf.get_u32_le();
27946        __struct.target_system = buf.get_u8();
27947        let tmp = buf.get_u8();
27948        __struct.base_mode =
27949            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27950                enum_type: "MavMode",
27951                value: tmp as u32,
27952            })?;
27953        Ok(__struct)
27954    }
27955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27956        let mut __tmp = BytesMut::new(bytes);
27957        #[allow(clippy::absurd_extreme_comparisons)]
27958        #[allow(unused_comparisons)]
27959        if __tmp.remaining() < Self::ENCODED_LEN {
27960            panic!(
27961                "buffer is too small (need {} bytes, but got {})",
27962                Self::ENCODED_LEN,
27963                __tmp.remaining(),
27964            )
27965        }
27966        __tmp.put_u32_le(self.custom_mode);
27967        __tmp.put_u8(self.target_system);
27968        __tmp.put_u8(self.base_mode as u8);
27969        if matches!(version, MavlinkVersion::V2) {
27970            let len = __tmp.len();
27971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27972        } else {
27973            __tmp.len()
27974        }
27975    }
27976}
27977#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27978#[doc = ""]
27979#[doc = "ID: 86"]
27980#[derive(Debug, Clone, PartialEq)]
27981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27983#[cfg_attr(feature = "ts", derive(TS))]
27984#[cfg_attr(feature = "ts", ts(export))]
27985pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27986    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27987    pub time_boot_ms: u32,
27988    #[doc = "Latitude in WGS84 frame"]
27989    pub lat_int: i32,
27990    #[doc = "Longitude in WGS84 frame"]
27991    pub lon_int: i32,
27992    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27993    pub alt: f32,
27994    #[doc = "X velocity in NED frame"]
27995    pub vx: f32,
27996    #[doc = "Y velocity in NED frame"]
27997    pub vy: f32,
27998    #[doc = "Z velocity in NED frame"]
27999    pub vz: f32,
28000    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28001    pub afx: f32,
28002    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28003    pub afy: f32,
28004    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28005    pub afz: f32,
28006    #[doc = "yaw setpoint"]
28007    pub yaw: f32,
28008    #[doc = "yaw rate setpoint"]
28009    pub yaw_rate: f32,
28010    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28011    pub type_mask: PositionTargetTypemask,
28012    #[doc = "System ID"]
28013    pub target_system: u8,
28014    #[doc = "Component ID"]
28015    pub target_component: u8,
28016    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28017    pub coordinate_frame: MavFrame,
28018}
28019impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28020    pub const ENCODED_LEN: usize = 53usize;
28021    pub const DEFAULT: Self = Self {
28022        time_boot_ms: 0_u32,
28023        lat_int: 0_i32,
28024        lon_int: 0_i32,
28025        alt: 0.0_f32,
28026        vx: 0.0_f32,
28027        vy: 0.0_f32,
28028        vz: 0.0_f32,
28029        afx: 0.0_f32,
28030        afy: 0.0_f32,
28031        afz: 0.0_f32,
28032        yaw: 0.0_f32,
28033        yaw_rate: 0.0_f32,
28034        type_mask: PositionTargetTypemask::DEFAULT,
28035        target_system: 0_u8,
28036        target_component: 0_u8,
28037        coordinate_frame: MavFrame::DEFAULT,
28038    };
28039    #[cfg(feature = "arbitrary")]
28040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28041        use arbitrary::{Arbitrary, Unstructured};
28042        let mut buf = [0u8; 1024];
28043        rng.fill_bytes(&mut buf);
28044        let mut unstructured = Unstructured::new(&buf);
28045        Self::arbitrary(&mut unstructured).unwrap_or_default()
28046    }
28047}
28048impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28049    fn default() -> Self {
28050        Self::DEFAULT.clone()
28051    }
28052}
28053impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28054    type Message = MavMessage;
28055    const ID: u32 = 86u32;
28056    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28057    const EXTRA_CRC: u8 = 5u8;
28058    const ENCODED_LEN: usize = 53usize;
28059    fn deser(
28060        _version: MavlinkVersion,
28061        __input: &[u8],
28062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28063        let avail_len = __input.len();
28064        let mut payload_buf = [0; Self::ENCODED_LEN];
28065        let mut buf = if avail_len < Self::ENCODED_LEN {
28066            payload_buf[0..avail_len].copy_from_slice(__input);
28067            Bytes::new(&payload_buf)
28068        } else {
28069            Bytes::new(__input)
28070        };
28071        let mut __struct = Self::default();
28072        __struct.time_boot_ms = buf.get_u32_le();
28073        __struct.lat_int = buf.get_i32_le();
28074        __struct.lon_int = buf.get_i32_le();
28075        __struct.alt = buf.get_f32_le();
28076        __struct.vx = buf.get_f32_le();
28077        __struct.vy = buf.get_f32_le();
28078        __struct.vz = buf.get_f32_le();
28079        __struct.afx = buf.get_f32_le();
28080        __struct.afy = buf.get_f32_le();
28081        __struct.afz = buf.get_f32_le();
28082        __struct.yaw = buf.get_f32_le();
28083        __struct.yaw_rate = buf.get_f32_le();
28084        let tmp = buf.get_u16_le();
28085        __struct.type_mask = PositionTargetTypemask::from_bits(
28086            tmp & PositionTargetTypemask::all().bits(),
28087        )
28088        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28089            flag_type: "PositionTargetTypemask",
28090            value: tmp as u32,
28091        })?;
28092        __struct.target_system = buf.get_u8();
28093        __struct.target_component = buf.get_u8();
28094        let tmp = buf.get_u8();
28095        __struct.coordinate_frame =
28096            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28097                enum_type: "MavFrame",
28098                value: tmp as u32,
28099            })?;
28100        Ok(__struct)
28101    }
28102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28103        let mut __tmp = BytesMut::new(bytes);
28104        #[allow(clippy::absurd_extreme_comparisons)]
28105        #[allow(unused_comparisons)]
28106        if __tmp.remaining() < Self::ENCODED_LEN {
28107            panic!(
28108                "buffer is too small (need {} bytes, but got {})",
28109                Self::ENCODED_LEN,
28110                __tmp.remaining(),
28111            )
28112        }
28113        __tmp.put_u32_le(self.time_boot_ms);
28114        __tmp.put_i32_le(self.lat_int);
28115        __tmp.put_i32_le(self.lon_int);
28116        __tmp.put_f32_le(self.alt);
28117        __tmp.put_f32_le(self.vx);
28118        __tmp.put_f32_le(self.vy);
28119        __tmp.put_f32_le(self.vz);
28120        __tmp.put_f32_le(self.afx);
28121        __tmp.put_f32_le(self.afy);
28122        __tmp.put_f32_le(self.afz);
28123        __tmp.put_f32_le(self.yaw);
28124        __tmp.put_f32_le(self.yaw_rate);
28125        __tmp.put_u16_le(self.type_mask.bits());
28126        __tmp.put_u8(self.target_system);
28127        __tmp.put_u8(self.target_component);
28128        __tmp.put_u8(self.coordinate_frame as u8);
28129        if matches!(version, MavlinkVersion::V2) {
28130            let len = __tmp.len();
28131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28132        } else {
28133            __tmp.len()
28134        }
28135    }
28136}
28137#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28138#[doc = ""]
28139#[doc = "ID: 84"]
28140#[derive(Debug, Clone, PartialEq)]
28141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28143#[cfg_attr(feature = "ts", derive(TS))]
28144#[cfg_attr(feature = "ts", ts(export))]
28145pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28146    #[doc = "Timestamp (time since system boot)."]
28147    pub time_boot_ms: u32,
28148    #[doc = "X Position in NED frame"]
28149    pub x: f32,
28150    #[doc = "Y Position in NED frame"]
28151    pub y: f32,
28152    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28153    pub z: f32,
28154    #[doc = "X velocity in NED frame"]
28155    pub vx: f32,
28156    #[doc = "Y velocity in NED frame"]
28157    pub vy: f32,
28158    #[doc = "Z velocity in NED frame"]
28159    pub vz: f32,
28160    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28161    pub afx: f32,
28162    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28163    pub afy: f32,
28164    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28165    pub afz: f32,
28166    #[doc = "yaw setpoint"]
28167    pub yaw: f32,
28168    #[doc = "yaw rate setpoint"]
28169    pub yaw_rate: f32,
28170    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28171    pub type_mask: PositionTargetTypemask,
28172    #[doc = "System ID"]
28173    pub target_system: u8,
28174    #[doc = "Component ID"]
28175    pub target_component: u8,
28176    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28177    pub coordinate_frame: MavFrame,
28178}
28179impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28180    pub const ENCODED_LEN: usize = 53usize;
28181    pub const DEFAULT: Self = Self {
28182        time_boot_ms: 0_u32,
28183        x: 0.0_f32,
28184        y: 0.0_f32,
28185        z: 0.0_f32,
28186        vx: 0.0_f32,
28187        vy: 0.0_f32,
28188        vz: 0.0_f32,
28189        afx: 0.0_f32,
28190        afy: 0.0_f32,
28191        afz: 0.0_f32,
28192        yaw: 0.0_f32,
28193        yaw_rate: 0.0_f32,
28194        type_mask: PositionTargetTypemask::DEFAULT,
28195        target_system: 0_u8,
28196        target_component: 0_u8,
28197        coordinate_frame: MavFrame::DEFAULT,
28198    };
28199    #[cfg(feature = "arbitrary")]
28200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28201        use arbitrary::{Arbitrary, Unstructured};
28202        let mut buf = [0u8; 1024];
28203        rng.fill_bytes(&mut buf);
28204        let mut unstructured = Unstructured::new(&buf);
28205        Self::arbitrary(&mut unstructured).unwrap_or_default()
28206    }
28207}
28208impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28209    fn default() -> Self {
28210        Self::DEFAULT.clone()
28211    }
28212}
28213impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28214    type Message = MavMessage;
28215    const ID: u32 = 84u32;
28216    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28217    const EXTRA_CRC: u8 = 143u8;
28218    const ENCODED_LEN: usize = 53usize;
28219    fn deser(
28220        _version: MavlinkVersion,
28221        __input: &[u8],
28222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28223        let avail_len = __input.len();
28224        let mut payload_buf = [0; Self::ENCODED_LEN];
28225        let mut buf = if avail_len < Self::ENCODED_LEN {
28226            payload_buf[0..avail_len].copy_from_slice(__input);
28227            Bytes::new(&payload_buf)
28228        } else {
28229            Bytes::new(__input)
28230        };
28231        let mut __struct = Self::default();
28232        __struct.time_boot_ms = buf.get_u32_le();
28233        __struct.x = buf.get_f32_le();
28234        __struct.y = buf.get_f32_le();
28235        __struct.z = buf.get_f32_le();
28236        __struct.vx = buf.get_f32_le();
28237        __struct.vy = buf.get_f32_le();
28238        __struct.vz = buf.get_f32_le();
28239        __struct.afx = buf.get_f32_le();
28240        __struct.afy = buf.get_f32_le();
28241        __struct.afz = buf.get_f32_le();
28242        __struct.yaw = buf.get_f32_le();
28243        __struct.yaw_rate = buf.get_f32_le();
28244        let tmp = buf.get_u16_le();
28245        __struct.type_mask = PositionTargetTypemask::from_bits(
28246            tmp & PositionTargetTypemask::all().bits(),
28247        )
28248        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28249            flag_type: "PositionTargetTypemask",
28250            value: tmp as u32,
28251        })?;
28252        __struct.target_system = buf.get_u8();
28253        __struct.target_component = buf.get_u8();
28254        let tmp = buf.get_u8();
28255        __struct.coordinate_frame =
28256            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28257                enum_type: "MavFrame",
28258                value: tmp as u32,
28259            })?;
28260        Ok(__struct)
28261    }
28262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28263        let mut __tmp = BytesMut::new(bytes);
28264        #[allow(clippy::absurd_extreme_comparisons)]
28265        #[allow(unused_comparisons)]
28266        if __tmp.remaining() < Self::ENCODED_LEN {
28267            panic!(
28268                "buffer is too small (need {} bytes, but got {})",
28269                Self::ENCODED_LEN,
28270                __tmp.remaining(),
28271            )
28272        }
28273        __tmp.put_u32_le(self.time_boot_ms);
28274        __tmp.put_f32_le(self.x);
28275        __tmp.put_f32_le(self.y);
28276        __tmp.put_f32_le(self.z);
28277        __tmp.put_f32_le(self.vx);
28278        __tmp.put_f32_le(self.vy);
28279        __tmp.put_f32_le(self.vz);
28280        __tmp.put_f32_le(self.afx);
28281        __tmp.put_f32_le(self.afy);
28282        __tmp.put_f32_le(self.afz);
28283        __tmp.put_f32_le(self.yaw);
28284        __tmp.put_f32_le(self.yaw_rate);
28285        __tmp.put_u16_le(self.type_mask.bits());
28286        __tmp.put_u8(self.target_system);
28287        __tmp.put_u8(self.target_component);
28288        __tmp.put_u8(self.coordinate_frame as u8);
28289        if matches!(version, MavlinkVersion::V2) {
28290            let len = __tmp.len();
28291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28292        } else {
28293            __tmp.len()
28294        }
28295    }
28296}
28297#[doc = "Status of simulation environment, if used."]
28298#[doc = ""]
28299#[doc = "ID: 108"]
28300#[derive(Debug, Clone, PartialEq)]
28301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28303#[cfg_attr(feature = "ts", derive(TS))]
28304#[cfg_attr(feature = "ts", ts(export))]
28305pub struct SIM_STATE_DATA {
28306    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28307    pub q1: f32,
28308    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28309    pub q2: f32,
28310    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28311    pub q3: f32,
28312    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28313    pub q4: f32,
28314    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28315    pub roll: f32,
28316    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28317    pub pitch: f32,
28318    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28319    pub yaw: f32,
28320    #[doc = "X acceleration"]
28321    pub xacc: f32,
28322    #[doc = "Y acceleration"]
28323    pub yacc: f32,
28324    #[doc = "Z acceleration"]
28325    pub zacc: f32,
28326    #[doc = "Angular speed around X axis"]
28327    pub xgyro: f32,
28328    #[doc = "Angular speed around Y axis"]
28329    pub ygyro: f32,
28330    #[doc = "Angular speed around Z axis"]
28331    pub zgyro: f32,
28332    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28333    pub lat: f32,
28334    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28335    pub lon: f32,
28336    #[doc = "Altitude"]
28337    pub alt: f32,
28338    #[doc = "Horizontal position standard deviation"]
28339    pub std_dev_horz: f32,
28340    #[doc = "Vertical position standard deviation"]
28341    pub std_dev_vert: f32,
28342    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28343    pub vn: f32,
28344    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28345    pub ve: f32,
28346    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28347    pub vd: f32,
28348    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28350    pub lat_int: i32,
28351    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28353    pub lon_int: i32,
28354}
28355impl SIM_STATE_DATA {
28356    pub const ENCODED_LEN: usize = 92usize;
28357    pub const DEFAULT: Self = Self {
28358        q1: 0.0_f32,
28359        q2: 0.0_f32,
28360        q3: 0.0_f32,
28361        q4: 0.0_f32,
28362        roll: 0.0_f32,
28363        pitch: 0.0_f32,
28364        yaw: 0.0_f32,
28365        xacc: 0.0_f32,
28366        yacc: 0.0_f32,
28367        zacc: 0.0_f32,
28368        xgyro: 0.0_f32,
28369        ygyro: 0.0_f32,
28370        zgyro: 0.0_f32,
28371        lat: 0.0_f32,
28372        lon: 0.0_f32,
28373        alt: 0.0_f32,
28374        std_dev_horz: 0.0_f32,
28375        std_dev_vert: 0.0_f32,
28376        vn: 0.0_f32,
28377        ve: 0.0_f32,
28378        vd: 0.0_f32,
28379        lat_int: 0_i32,
28380        lon_int: 0_i32,
28381    };
28382    #[cfg(feature = "arbitrary")]
28383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28384        use arbitrary::{Arbitrary, Unstructured};
28385        let mut buf = [0u8; 1024];
28386        rng.fill_bytes(&mut buf);
28387        let mut unstructured = Unstructured::new(&buf);
28388        Self::arbitrary(&mut unstructured).unwrap_or_default()
28389    }
28390}
28391impl Default for SIM_STATE_DATA {
28392    fn default() -> Self {
28393        Self::DEFAULT.clone()
28394    }
28395}
28396impl MessageData for SIM_STATE_DATA {
28397    type Message = MavMessage;
28398    const ID: u32 = 108u32;
28399    const NAME: &'static str = "SIM_STATE";
28400    const EXTRA_CRC: u8 = 32u8;
28401    const ENCODED_LEN: usize = 92usize;
28402    fn deser(
28403        _version: MavlinkVersion,
28404        __input: &[u8],
28405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28406        let avail_len = __input.len();
28407        let mut payload_buf = [0; Self::ENCODED_LEN];
28408        let mut buf = if avail_len < Self::ENCODED_LEN {
28409            payload_buf[0..avail_len].copy_from_slice(__input);
28410            Bytes::new(&payload_buf)
28411        } else {
28412            Bytes::new(__input)
28413        };
28414        let mut __struct = Self::default();
28415        __struct.q1 = buf.get_f32_le();
28416        __struct.q2 = buf.get_f32_le();
28417        __struct.q3 = buf.get_f32_le();
28418        __struct.q4 = buf.get_f32_le();
28419        __struct.roll = buf.get_f32_le();
28420        __struct.pitch = buf.get_f32_le();
28421        __struct.yaw = buf.get_f32_le();
28422        __struct.xacc = buf.get_f32_le();
28423        __struct.yacc = buf.get_f32_le();
28424        __struct.zacc = buf.get_f32_le();
28425        __struct.xgyro = buf.get_f32_le();
28426        __struct.ygyro = buf.get_f32_le();
28427        __struct.zgyro = buf.get_f32_le();
28428        __struct.lat = buf.get_f32_le();
28429        __struct.lon = buf.get_f32_le();
28430        __struct.alt = buf.get_f32_le();
28431        __struct.std_dev_horz = buf.get_f32_le();
28432        __struct.std_dev_vert = buf.get_f32_le();
28433        __struct.vn = buf.get_f32_le();
28434        __struct.ve = buf.get_f32_le();
28435        __struct.vd = buf.get_f32_le();
28436        __struct.lat_int = buf.get_i32_le();
28437        __struct.lon_int = buf.get_i32_le();
28438        Ok(__struct)
28439    }
28440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28441        let mut __tmp = BytesMut::new(bytes);
28442        #[allow(clippy::absurd_extreme_comparisons)]
28443        #[allow(unused_comparisons)]
28444        if __tmp.remaining() < Self::ENCODED_LEN {
28445            panic!(
28446                "buffer is too small (need {} bytes, but got {})",
28447                Self::ENCODED_LEN,
28448                __tmp.remaining(),
28449            )
28450        }
28451        __tmp.put_f32_le(self.q1);
28452        __tmp.put_f32_le(self.q2);
28453        __tmp.put_f32_le(self.q3);
28454        __tmp.put_f32_le(self.q4);
28455        __tmp.put_f32_le(self.roll);
28456        __tmp.put_f32_le(self.pitch);
28457        __tmp.put_f32_le(self.yaw);
28458        __tmp.put_f32_le(self.xacc);
28459        __tmp.put_f32_le(self.yacc);
28460        __tmp.put_f32_le(self.zacc);
28461        __tmp.put_f32_le(self.xgyro);
28462        __tmp.put_f32_le(self.ygyro);
28463        __tmp.put_f32_le(self.zgyro);
28464        __tmp.put_f32_le(self.lat);
28465        __tmp.put_f32_le(self.lon);
28466        __tmp.put_f32_le(self.alt);
28467        __tmp.put_f32_le(self.std_dev_horz);
28468        __tmp.put_f32_le(self.std_dev_vert);
28469        __tmp.put_f32_le(self.vn);
28470        __tmp.put_f32_le(self.ve);
28471        __tmp.put_f32_le(self.vd);
28472        if matches!(version, MavlinkVersion::V2) {
28473            __tmp.put_i32_le(self.lat_int);
28474            __tmp.put_i32_le(self.lon_int);
28475            let len = __tmp.len();
28476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28477        } else {
28478            __tmp.len()
28479        }
28480    }
28481}
28482#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28483#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28484#[doc = ""]
28485#[doc = "ID: 370"]
28486#[derive(Debug, Clone, PartialEq)]
28487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28489#[cfg_attr(feature = "ts", derive(TS))]
28490#[cfg_attr(feature = "ts", ts(export))]
28491pub struct SMART_BATTERY_INFO_DATA {
28492    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28493    pub capacity_full_specification: i32,
28494    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28495    pub capacity_full: i32,
28496    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28497    pub cycle_count: u16,
28498    #[doc = "Battery weight. 0: field not provided."]
28499    pub weight: u16,
28500    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28501    pub discharge_minimum_voltage: u16,
28502    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28503    pub charging_minimum_voltage: u16,
28504    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28505    pub resting_minimum_voltage: u16,
28506    #[doc = "Battery ID"]
28507    pub id: u8,
28508    #[doc = "Function of the battery"]
28509    pub battery_function: MavBatteryFunction,
28510    #[doc = "Type (chemistry) of the battery"]
28511    pub mavtype: MavBatteryType,
28512    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28513    #[cfg_attr(feature = "ts", ts(type = "string"))]
28514    pub serial_number: CharArray<16>,
28515    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28516    #[cfg_attr(feature = "ts", ts(type = "string"))]
28517    pub device_name: CharArray<50>,
28518    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28519    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28520    pub charging_maximum_voltage: u16,
28521    #[doc = "Number of battery cells in series. 0: field not provided."]
28522    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28523    pub cells_in_series: u8,
28524    #[doc = "Maximum pack discharge current. 0: field not provided."]
28525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28526    pub discharge_maximum_current: u32,
28527    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28528    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28529    pub discharge_maximum_burst_current: u32,
28530    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28531    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28532    #[cfg_attr(feature = "ts", ts(type = "string"))]
28533    pub manufacture_date: CharArray<11>,
28534}
28535impl SMART_BATTERY_INFO_DATA {
28536    pub const ENCODED_LEN: usize = 109usize;
28537    pub const DEFAULT: Self = Self {
28538        capacity_full_specification: 0_i32,
28539        capacity_full: 0_i32,
28540        cycle_count: 0_u16,
28541        weight: 0_u16,
28542        discharge_minimum_voltage: 0_u16,
28543        charging_minimum_voltage: 0_u16,
28544        resting_minimum_voltage: 0_u16,
28545        id: 0_u8,
28546        battery_function: MavBatteryFunction::DEFAULT,
28547        mavtype: MavBatteryType::DEFAULT,
28548        serial_number: CharArray::new([0_u8; 16usize]),
28549        device_name: CharArray::new([0_u8; 50usize]),
28550        charging_maximum_voltage: 0_u16,
28551        cells_in_series: 0_u8,
28552        discharge_maximum_current: 0_u32,
28553        discharge_maximum_burst_current: 0_u32,
28554        manufacture_date: CharArray::new([0_u8; 11usize]),
28555    };
28556    #[cfg(feature = "arbitrary")]
28557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28558        use arbitrary::{Arbitrary, Unstructured};
28559        let mut buf = [0u8; 1024];
28560        rng.fill_bytes(&mut buf);
28561        let mut unstructured = Unstructured::new(&buf);
28562        Self::arbitrary(&mut unstructured).unwrap_or_default()
28563    }
28564}
28565impl Default for SMART_BATTERY_INFO_DATA {
28566    fn default() -> Self {
28567        Self::DEFAULT.clone()
28568    }
28569}
28570impl MessageData for SMART_BATTERY_INFO_DATA {
28571    type Message = MavMessage;
28572    const ID: u32 = 370u32;
28573    const NAME: &'static str = "SMART_BATTERY_INFO";
28574    const EXTRA_CRC: u8 = 75u8;
28575    const ENCODED_LEN: usize = 109usize;
28576    fn deser(
28577        _version: MavlinkVersion,
28578        __input: &[u8],
28579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28580        let avail_len = __input.len();
28581        let mut payload_buf = [0; Self::ENCODED_LEN];
28582        let mut buf = if avail_len < Self::ENCODED_LEN {
28583            payload_buf[0..avail_len].copy_from_slice(__input);
28584            Bytes::new(&payload_buf)
28585        } else {
28586            Bytes::new(__input)
28587        };
28588        let mut __struct = Self::default();
28589        __struct.capacity_full_specification = buf.get_i32_le();
28590        __struct.capacity_full = buf.get_i32_le();
28591        __struct.cycle_count = buf.get_u16_le();
28592        __struct.weight = buf.get_u16_le();
28593        __struct.discharge_minimum_voltage = buf.get_u16_le();
28594        __struct.charging_minimum_voltage = buf.get_u16_le();
28595        __struct.resting_minimum_voltage = buf.get_u16_le();
28596        __struct.id = buf.get_u8();
28597        let tmp = buf.get_u8();
28598        __struct.battery_function =
28599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28600                enum_type: "MavBatteryFunction",
28601                value: tmp as u32,
28602            })?;
28603        let tmp = buf.get_u8();
28604        __struct.mavtype =
28605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28606                enum_type: "MavBatteryType",
28607                value: tmp as u32,
28608            })?;
28609        let mut tmp = [0_u8; 16usize];
28610        for v in &mut tmp {
28611            *v = buf.get_u8();
28612        }
28613        __struct.serial_number = CharArray::new(tmp);
28614        let mut tmp = [0_u8; 50usize];
28615        for v in &mut tmp {
28616            *v = buf.get_u8();
28617        }
28618        __struct.device_name = CharArray::new(tmp);
28619        __struct.charging_maximum_voltage = buf.get_u16_le();
28620        __struct.cells_in_series = buf.get_u8();
28621        __struct.discharge_maximum_current = buf.get_u32_le();
28622        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28623        let mut tmp = [0_u8; 11usize];
28624        for v in &mut tmp {
28625            *v = buf.get_u8();
28626        }
28627        __struct.manufacture_date = CharArray::new(tmp);
28628        Ok(__struct)
28629    }
28630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28631        let mut __tmp = BytesMut::new(bytes);
28632        #[allow(clippy::absurd_extreme_comparisons)]
28633        #[allow(unused_comparisons)]
28634        if __tmp.remaining() < Self::ENCODED_LEN {
28635            panic!(
28636                "buffer is too small (need {} bytes, but got {})",
28637                Self::ENCODED_LEN,
28638                __tmp.remaining(),
28639            )
28640        }
28641        __tmp.put_i32_le(self.capacity_full_specification);
28642        __tmp.put_i32_le(self.capacity_full);
28643        __tmp.put_u16_le(self.cycle_count);
28644        __tmp.put_u16_le(self.weight);
28645        __tmp.put_u16_le(self.discharge_minimum_voltage);
28646        __tmp.put_u16_le(self.charging_minimum_voltage);
28647        __tmp.put_u16_le(self.resting_minimum_voltage);
28648        __tmp.put_u8(self.id);
28649        __tmp.put_u8(self.battery_function as u8);
28650        __tmp.put_u8(self.mavtype as u8);
28651        for val in &self.serial_number {
28652            __tmp.put_u8(*val);
28653        }
28654        for val in &self.device_name {
28655            __tmp.put_u8(*val);
28656        }
28657        if matches!(version, MavlinkVersion::V2) {
28658            __tmp.put_u16_le(self.charging_maximum_voltage);
28659            __tmp.put_u8(self.cells_in_series);
28660            __tmp.put_u32_le(self.discharge_maximum_current);
28661            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28662            for val in &self.manufacture_date {
28663                __tmp.put_u8(*val);
28664            }
28665            let len = __tmp.len();
28666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28667        } else {
28668            __tmp.len()
28669        }
28670    }
28671}
28672#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28673#[doc = ""]
28674#[doc = "ID: 253"]
28675#[derive(Debug, Clone, PartialEq)]
28676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28678#[cfg_attr(feature = "ts", derive(TS))]
28679#[cfg_attr(feature = "ts", ts(export))]
28680pub struct STATUSTEXT_DATA {
28681    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28682    pub severity: MavSeverity,
28683    #[doc = "Status text message, without null termination character"]
28684    #[cfg_attr(feature = "ts", ts(type = "string"))]
28685    pub text: CharArray<50>,
28686    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28688    pub id: u16,
28689    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28690    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28691    pub chunk_seq: u8,
28692}
28693impl STATUSTEXT_DATA {
28694    pub const ENCODED_LEN: usize = 54usize;
28695    pub const DEFAULT: Self = Self {
28696        severity: MavSeverity::DEFAULT,
28697        text: CharArray::new([0_u8; 50usize]),
28698        id: 0_u16,
28699        chunk_seq: 0_u8,
28700    };
28701    #[cfg(feature = "arbitrary")]
28702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28703        use arbitrary::{Arbitrary, Unstructured};
28704        let mut buf = [0u8; 1024];
28705        rng.fill_bytes(&mut buf);
28706        let mut unstructured = Unstructured::new(&buf);
28707        Self::arbitrary(&mut unstructured).unwrap_or_default()
28708    }
28709}
28710impl Default for STATUSTEXT_DATA {
28711    fn default() -> Self {
28712        Self::DEFAULT.clone()
28713    }
28714}
28715impl MessageData for STATUSTEXT_DATA {
28716    type Message = MavMessage;
28717    const ID: u32 = 253u32;
28718    const NAME: &'static str = "STATUSTEXT";
28719    const EXTRA_CRC: u8 = 83u8;
28720    const ENCODED_LEN: usize = 54usize;
28721    fn deser(
28722        _version: MavlinkVersion,
28723        __input: &[u8],
28724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28725        let avail_len = __input.len();
28726        let mut payload_buf = [0; Self::ENCODED_LEN];
28727        let mut buf = if avail_len < Self::ENCODED_LEN {
28728            payload_buf[0..avail_len].copy_from_slice(__input);
28729            Bytes::new(&payload_buf)
28730        } else {
28731            Bytes::new(__input)
28732        };
28733        let mut __struct = Self::default();
28734        let tmp = buf.get_u8();
28735        __struct.severity =
28736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28737                enum_type: "MavSeverity",
28738                value: tmp as u32,
28739            })?;
28740        let mut tmp = [0_u8; 50usize];
28741        for v in &mut tmp {
28742            *v = buf.get_u8();
28743        }
28744        __struct.text = CharArray::new(tmp);
28745        __struct.id = buf.get_u16_le();
28746        __struct.chunk_seq = buf.get_u8();
28747        Ok(__struct)
28748    }
28749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28750        let mut __tmp = BytesMut::new(bytes);
28751        #[allow(clippy::absurd_extreme_comparisons)]
28752        #[allow(unused_comparisons)]
28753        if __tmp.remaining() < Self::ENCODED_LEN {
28754            panic!(
28755                "buffer is too small (need {} bytes, but got {})",
28756                Self::ENCODED_LEN,
28757                __tmp.remaining(),
28758            )
28759        }
28760        __tmp.put_u8(self.severity as u8);
28761        for val in &self.text {
28762            __tmp.put_u8(*val);
28763        }
28764        if matches!(version, MavlinkVersion::V2) {
28765            __tmp.put_u16_le(self.id);
28766            __tmp.put_u8(self.chunk_seq);
28767            let len = __tmp.len();
28768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28769        } else {
28770            __tmp.len()
28771        }
28772    }
28773}
28774#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28775#[doc = ""]
28776#[doc = "ID: 261"]
28777#[derive(Debug, Clone, PartialEq)]
28778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28780#[cfg_attr(feature = "ts", derive(TS))]
28781#[cfg_attr(feature = "ts", ts(export))]
28782pub struct STORAGE_INFORMATION_DATA {
28783    #[doc = "Timestamp (time since system boot)."]
28784    pub time_boot_ms: u32,
28785    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28786    pub total_capacity: f32,
28787    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28788    pub used_capacity: f32,
28789    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28790    pub available_capacity: f32,
28791    #[doc = "Read speed."]
28792    pub read_speed: f32,
28793    #[doc = "Write speed."]
28794    pub write_speed: f32,
28795    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28796    pub storage_id: u8,
28797    #[doc = "Number of storage devices"]
28798    pub storage_count: u8,
28799    #[doc = "Status of storage"]
28800    pub status: StorageStatus,
28801    #[doc = "Type of storage"]
28802    #[cfg_attr(feature = "serde", serde(default))]
28803    pub mavtype: StorageType,
28804    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28806    #[cfg_attr(feature = "ts", ts(type = "string"))]
28807    pub name: CharArray<32>,
28808    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28809    #[cfg_attr(feature = "serde", serde(default))]
28810    pub storage_usage: StorageUsageFlag,
28811}
28812impl STORAGE_INFORMATION_DATA {
28813    pub const ENCODED_LEN: usize = 61usize;
28814    pub const DEFAULT: Self = Self {
28815        time_boot_ms: 0_u32,
28816        total_capacity: 0.0_f32,
28817        used_capacity: 0.0_f32,
28818        available_capacity: 0.0_f32,
28819        read_speed: 0.0_f32,
28820        write_speed: 0.0_f32,
28821        storage_id: 0_u8,
28822        storage_count: 0_u8,
28823        status: StorageStatus::DEFAULT,
28824        mavtype: StorageType::DEFAULT,
28825        name: CharArray::new([0_u8; 32usize]),
28826        storage_usage: StorageUsageFlag::DEFAULT,
28827    };
28828    #[cfg(feature = "arbitrary")]
28829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28830        use arbitrary::{Arbitrary, Unstructured};
28831        let mut buf = [0u8; 1024];
28832        rng.fill_bytes(&mut buf);
28833        let mut unstructured = Unstructured::new(&buf);
28834        Self::arbitrary(&mut unstructured).unwrap_or_default()
28835    }
28836}
28837impl Default for STORAGE_INFORMATION_DATA {
28838    fn default() -> Self {
28839        Self::DEFAULT.clone()
28840    }
28841}
28842impl MessageData for STORAGE_INFORMATION_DATA {
28843    type Message = MavMessage;
28844    const ID: u32 = 261u32;
28845    const NAME: &'static str = "STORAGE_INFORMATION";
28846    const EXTRA_CRC: u8 = 179u8;
28847    const ENCODED_LEN: usize = 61usize;
28848    fn deser(
28849        _version: MavlinkVersion,
28850        __input: &[u8],
28851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28852        let avail_len = __input.len();
28853        let mut payload_buf = [0; Self::ENCODED_LEN];
28854        let mut buf = if avail_len < Self::ENCODED_LEN {
28855            payload_buf[0..avail_len].copy_from_slice(__input);
28856            Bytes::new(&payload_buf)
28857        } else {
28858            Bytes::new(__input)
28859        };
28860        let mut __struct = Self::default();
28861        __struct.time_boot_ms = buf.get_u32_le();
28862        __struct.total_capacity = buf.get_f32_le();
28863        __struct.used_capacity = buf.get_f32_le();
28864        __struct.available_capacity = buf.get_f32_le();
28865        __struct.read_speed = buf.get_f32_le();
28866        __struct.write_speed = buf.get_f32_le();
28867        __struct.storage_id = buf.get_u8();
28868        __struct.storage_count = buf.get_u8();
28869        let tmp = buf.get_u8();
28870        __struct.status =
28871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28872                enum_type: "StorageStatus",
28873                value: tmp as u32,
28874            })?;
28875        let tmp = buf.get_u8();
28876        __struct.mavtype =
28877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28878                enum_type: "StorageType",
28879                value: tmp as u32,
28880            })?;
28881        let mut tmp = [0_u8; 32usize];
28882        for v in &mut tmp {
28883            *v = buf.get_u8();
28884        }
28885        __struct.name = CharArray::new(tmp);
28886        let tmp = buf.get_u8();
28887        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28888            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28889                flag_type: "StorageUsageFlag",
28890                value: tmp as u32,
28891            })?;
28892        Ok(__struct)
28893    }
28894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28895        let mut __tmp = BytesMut::new(bytes);
28896        #[allow(clippy::absurd_extreme_comparisons)]
28897        #[allow(unused_comparisons)]
28898        if __tmp.remaining() < Self::ENCODED_LEN {
28899            panic!(
28900                "buffer is too small (need {} bytes, but got {})",
28901                Self::ENCODED_LEN,
28902                __tmp.remaining(),
28903            )
28904        }
28905        __tmp.put_u32_le(self.time_boot_ms);
28906        __tmp.put_f32_le(self.total_capacity);
28907        __tmp.put_f32_le(self.used_capacity);
28908        __tmp.put_f32_le(self.available_capacity);
28909        __tmp.put_f32_le(self.read_speed);
28910        __tmp.put_f32_le(self.write_speed);
28911        __tmp.put_u8(self.storage_id);
28912        __tmp.put_u8(self.storage_count);
28913        __tmp.put_u8(self.status as u8);
28914        if matches!(version, MavlinkVersion::V2) {
28915            __tmp.put_u8(self.mavtype as u8);
28916            for val in &self.name {
28917                __tmp.put_u8(*val);
28918            }
28919            __tmp.put_u8(self.storage_usage.bits());
28920            let len = __tmp.len();
28921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28922        } else {
28923            __tmp.len()
28924        }
28925    }
28926}
28927#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28928#[doc = ""]
28929#[doc = "ID: 401"]
28930#[derive(Debug, Clone, PartialEq)]
28931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28933#[cfg_attr(feature = "ts", derive(TS))]
28934#[cfg_attr(feature = "ts", ts(export))]
28935pub struct SUPPORTED_TUNES_DATA {
28936    #[doc = "Bitfield of supported tune formats."]
28937    pub format: TuneFormat,
28938    #[doc = "System ID"]
28939    pub target_system: u8,
28940    #[doc = "Component ID"]
28941    pub target_component: u8,
28942}
28943impl SUPPORTED_TUNES_DATA {
28944    pub const ENCODED_LEN: usize = 6usize;
28945    pub const DEFAULT: Self = Self {
28946        format: TuneFormat::DEFAULT,
28947        target_system: 0_u8,
28948        target_component: 0_u8,
28949    };
28950    #[cfg(feature = "arbitrary")]
28951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28952        use arbitrary::{Arbitrary, Unstructured};
28953        let mut buf = [0u8; 1024];
28954        rng.fill_bytes(&mut buf);
28955        let mut unstructured = Unstructured::new(&buf);
28956        Self::arbitrary(&mut unstructured).unwrap_or_default()
28957    }
28958}
28959impl Default for SUPPORTED_TUNES_DATA {
28960    fn default() -> Self {
28961        Self::DEFAULT.clone()
28962    }
28963}
28964impl MessageData for SUPPORTED_TUNES_DATA {
28965    type Message = MavMessage;
28966    const ID: u32 = 401u32;
28967    const NAME: &'static str = "SUPPORTED_TUNES";
28968    const EXTRA_CRC: u8 = 183u8;
28969    const ENCODED_LEN: usize = 6usize;
28970    fn deser(
28971        _version: MavlinkVersion,
28972        __input: &[u8],
28973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28974        let avail_len = __input.len();
28975        let mut payload_buf = [0; Self::ENCODED_LEN];
28976        let mut buf = if avail_len < Self::ENCODED_LEN {
28977            payload_buf[0..avail_len].copy_from_slice(__input);
28978            Bytes::new(&payload_buf)
28979        } else {
28980            Bytes::new(__input)
28981        };
28982        let mut __struct = Self::default();
28983        let tmp = buf.get_u32_le();
28984        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28985            ::mavlink_core::error::ParserError::InvalidEnum {
28986                enum_type: "TuneFormat",
28987                value: tmp as u32,
28988            },
28989        )?;
28990        __struct.target_system = buf.get_u8();
28991        __struct.target_component = buf.get_u8();
28992        Ok(__struct)
28993    }
28994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28995        let mut __tmp = BytesMut::new(bytes);
28996        #[allow(clippy::absurd_extreme_comparisons)]
28997        #[allow(unused_comparisons)]
28998        if __tmp.remaining() < Self::ENCODED_LEN {
28999            panic!(
29000                "buffer is too small (need {} bytes, but got {})",
29001                Self::ENCODED_LEN,
29002                __tmp.remaining(),
29003            )
29004        }
29005        __tmp.put_u32_le(self.format as u32);
29006        __tmp.put_u8(self.target_system);
29007        __tmp.put_u8(self.target_component);
29008        if matches!(version, MavlinkVersion::V2) {
29009            let len = __tmp.len();
29010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29011        } else {
29012            __tmp.len()
29013        }
29014    }
29015}
29016#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29017#[doc = ""]
29018#[doc = "ID: 2"]
29019#[derive(Debug, Clone, PartialEq)]
29020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29022#[cfg_attr(feature = "ts", derive(TS))]
29023#[cfg_attr(feature = "ts", ts(export))]
29024pub struct SYSTEM_TIME_DATA {
29025    #[doc = "Timestamp (UNIX epoch time)."]
29026    pub time_unix_usec: u64,
29027    #[doc = "Timestamp (time since system boot)."]
29028    pub time_boot_ms: u32,
29029}
29030impl SYSTEM_TIME_DATA {
29031    pub const ENCODED_LEN: usize = 12usize;
29032    pub const DEFAULT: Self = Self {
29033        time_unix_usec: 0_u64,
29034        time_boot_ms: 0_u32,
29035    };
29036    #[cfg(feature = "arbitrary")]
29037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29038        use arbitrary::{Arbitrary, Unstructured};
29039        let mut buf = [0u8; 1024];
29040        rng.fill_bytes(&mut buf);
29041        let mut unstructured = Unstructured::new(&buf);
29042        Self::arbitrary(&mut unstructured).unwrap_or_default()
29043    }
29044}
29045impl Default for SYSTEM_TIME_DATA {
29046    fn default() -> Self {
29047        Self::DEFAULT.clone()
29048    }
29049}
29050impl MessageData for SYSTEM_TIME_DATA {
29051    type Message = MavMessage;
29052    const ID: u32 = 2u32;
29053    const NAME: &'static str = "SYSTEM_TIME";
29054    const EXTRA_CRC: u8 = 137u8;
29055    const ENCODED_LEN: usize = 12usize;
29056    fn deser(
29057        _version: MavlinkVersion,
29058        __input: &[u8],
29059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29060        let avail_len = __input.len();
29061        let mut payload_buf = [0; Self::ENCODED_LEN];
29062        let mut buf = if avail_len < Self::ENCODED_LEN {
29063            payload_buf[0..avail_len].copy_from_slice(__input);
29064            Bytes::new(&payload_buf)
29065        } else {
29066            Bytes::new(__input)
29067        };
29068        let mut __struct = Self::default();
29069        __struct.time_unix_usec = buf.get_u64_le();
29070        __struct.time_boot_ms = buf.get_u32_le();
29071        Ok(__struct)
29072    }
29073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29074        let mut __tmp = BytesMut::new(bytes);
29075        #[allow(clippy::absurd_extreme_comparisons)]
29076        #[allow(unused_comparisons)]
29077        if __tmp.remaining() < Self::ENCODED_LEN {
29078            panic!(
29079                "buffer is too small (need {} bytes, but got {})",
29080                Self::ENCODED_LEN,
29081                __tmp.remaining(),
29082            )
29083        }
29084        __tmp.put_u64_le(self.time_unix_usec);
29085        __tmp.put_u32_le(self.time_boot_ms);
29086        if matches!(version, MavlinkVersion::V2) {
29087            let len = __tmp.len();
29088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29089        } else {
29090            __tmp.len()
29091        }
29092    }
29093}
29094#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29095#[doc = ""]
29096#[doc = "ID: 1"]
29097#[derive(Debug, Clone, PartialEq)]
29098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29100#[cfg_attr(feature = "ts", derive(TS))]
29101#[cfg_attr(feature = "ts", ts(export))]
29102pub struct SYS_STATUS_DATA {
29103    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29104    pub onboard_control_sensors_present: MavSysStatusSensor,
29105    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29106    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29107    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29108    pub onboard_control_sensors_health: MavSysStatusSensor,
29109    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29110    pub load: u16,
29111    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29112    pub voltage_battery: u16,
29113    #[doc = "Battery current, -1: Current not sent by autopilot"]
29114    pub current_battery: i16,
29115    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29116    pub drop_rate_comm: u16,
29117    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29118    pub errors_comm: u16,
29119    #[doc = "Autopilot-specific errors"]
29120    pub errors_count1: u16,
29121    #[doc = "Autopilot-specific errors"]
29122    pub errors_count2: u16,
29123    #[doc = "Autopilot-specific errors"]
29124    pub errors_count3: u16,
29125    #[doc = "Autopilot-specific errors"]
29126    pub errors_count4: u16,
29127    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29128    pub battery_remaining: i8,
29129    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29130    #[cfg_attr(feature = "serde", serde(default))]
29131    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29132    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29133    #[cfg_attr(feature = "serde", serde(default))]
29134    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29135    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29136    #[cfg_attr(feature = "serde", serde(default))]
29137    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29138}
29139impl SYS_STATUS_DATA {
29140    pub const ENCODED_LEN: usize = 43usize;
29141    pub const DEFAULT: Self = Self {
29142        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29143        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29144        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29145        load: 0_u16,
29146        voltage_battery: 0_u16,
29147        current_battery: 0_i16,
29148        drop_rate_comm: 0_u16,
29149        errors_comm: 0_u16,
29150        errors_count1: 0_u16,
29151        errors_count2: 0_u16,
29152        errors_count3: 0_u16,
29153        errors_count4: 0_u16,
29154        battery_remaining: 0_i8,
29155        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29156        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29157        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29158    };
29159    #[cfg(feature = "arbitrary")]
29160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29161        use arbitrary::{Arbitrary, Unstructured};
29162        let mut buf = [0u8; 1024];
29163        rng.fill_bytes(&mut buf);
29164        let mut unstructured = Unstructured::new(&buf);
29165        Self::arbitrary(&mut unstructured).unwrap_or_default()
29166    }
29167}
29168impl Default for SYS_STATUS_DATA {
29169    fn default() -> Self {
29170        Self::DEFAULT.clone()
29171    }
29172}
29173impl MessageData for SYS_STATUS_DATA {
29174    type Message = MavMessage;
29175    const ID: u32 = 1u32;
29176    const NAME: &'static str = "SYS_STATUS";
29177    const EXTRA_CRC: u8 = 124u8;
29178    const ENCODED_LEN: usize = 43usize;
29179    fn deser(
29180        _version: MavlinkVersion,
29181        __input: &[u8],
29182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29183        let avail_len = __input.len();
29184        let mut payload_buf = [0; Self::ENCODED_LEN];
29185        let mut buf = if avail_len < Self::ENCODED_LEN {
29186            payload_buf[0..avail_len].copy_from_slice(__input);
29187            Bytes::new(&payload_buf)
29188        } else {
29189            Bytes::new(__input)
29190        };
29191        let mut __struct = Self::default();
29192        let tmp = buf.get_u32_le();
29193        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29194            tmp & MavSysStatusSensor::all().bits(),
29195        )
29196        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29197            flag_type: "MavSysStatusSensor",
29198            value: tmp as u32,
29199        })?;
29200        let tmp = buf.get_u32_le();
29201        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29202            tmp & MavSysStatusSensor::all().bits(),
29203        )
29204        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29205            flag_type: "MavSysStatusSensor",
29206            value: tmp as u32,
29207        })?;
29208        let tmp = buf.get_u32_le();
29209        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29210            tmp & MavSysStatusSensor::all().bits(),
29211        )
29212        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29213            flag_type: "MavSysStatusSensor",
29214            value: tmp as u32,
29215        })?;
29216        __struct.load = buf.get_u16_le();
29217        __struct.voltage_battery = buf.get_u16_le();
29218        __struct.current_battery = buf.get_i16_le();
29219        __struct.drop_rate_comm = buf.get_u16_le();
29220        __struct.errors_comm = buf.get_u16_le();
29221        __struct.errors_count1 = buf.get_u16_le();
29222        __struct.errors_count2 = buf.get_u16_le();
29223        __struct.errors_count3 = buf.get_u16_le();
29224        __struct.errors_count4 = buf.get_u16_le();
29225        __struct.battery_remaining = buf.get_i8();
29226        let tmp = buf.get_u32_le();
29227        __struct.onboard_control_sensors_present_extended =
29228            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29229                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29230                flag_type: "MavSysStatusSensorExtended",
29231                value: tmp as u32,
29232            })?;
29233        let tmp = buf.get_u32_le();
29234        __struct.onboard_control_sensors_enabled_extended =
29235            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29236                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29237                flag_type: "MavSysStatusSensorExtended",
29238                value: tmp as u32,
29239            })?;
29240        let tmp = buf.get_u32_le();
29241        __struct.onboard_control_sensors_health_extended =
29242            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29243                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29244                flag_type: "MavSysStatusSensorExtended",
29245                value: tmp as u32,
29246            })?;
29247        Ok(__struct)
29248    }
29249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29250        let mut __tmp = BytesMut::new(bytes);
29251        #[allow(clippy::absurd_extreme_comparisons)]
29252        #[allow(unused_comparisons)]
29253        if __tmp.remaining() < Self::ENCODED_LEN {
29254            panic!(
29255                "buffer is too small (need {} bytes, but got {})",
29256                Self::ENCODED_LEN,
29257                __tmp.remaining(),
29258            )
29259        }
29260        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29261        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29262        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29263        __tmp.put_u16_le(self.load);
29264        __tmp.put_u16_le(self.voltage_battery);
29265        __tmp.put_i16_le(self.current_battery);
29266        __tmp.put_u16_le(self.drop_rate_comm);
29267        __tmp.put_u16_le(self.errors_comm);
29268        __tmp.put_u16_le(self.errors_count1);
29269        __tmp.put_u16_le(self.errors_count2);
29270        __tmp.put_u16_le(self.errors_count3);
29271        __tmp.put_u16_le(self.errors_count4);
29272        __tmp.put_i8(self.battery_remaining);
29273        if matches!(version, MavlinkVersion::V2) {
29274            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29275            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29276            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29277            let len = __tmp.len();
29278            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29279        } else {
29280            __tmp.len()
29281        }
29282    }
29283}
29284#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29285#[doc = ""]
29286#[doc = "ID: 135"]
29287#[derive(Debug, Clone, PartialEq)]
29288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29290#[cfg_attr(feature = "ts", derive(TS))]
29291#[cfg_attr(feature = "ts", ts(export))]
29292pub struct TERRAIN_CHECK_DATA {
29293    #[doc = "Latitude"]
29294    pub lat: i32,
29295    #[doc = "Longitude"]
29296    pub lon: i32,
29297}
29298impl TERRAIN_CHECK_DATA {
29299    pub const ENCODED_LEN: usize = 8usize;
29300    pub const DEFAULT: Self = Self {
29301        lat: 0_i32,
29302        lon: 0_i32,
29303    };
29304    #[cfg(feature = "arbitrary")]
29305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29306        use arbitrary::{Arbitrary, Unstructured};
29307        let mut buf = [0u8; 1024];
29308        rng.fill_bytes(&mut buf);
29309        let mut unstructured = Unstructured::new(&buf);
29310        Self::arbitrary(&mut unstructured).unwrap_or_default()
29311    }
29312}
29313impl Default for TERRAIN_CHECK_DATA {
29314    fn default() -> Self {
29315        Self::DEFAULT.clone()
29316    }
29317}
29318impl MessageData for TERRAIN_CHECK_DATA {
29319    type Message = MavMessage;
29320    const ID: u32 = 135u32;
29321    const NAME: &'static str = "TERRAIN_CHECK";
29322    const EXTRA_CRC: u8 = 203u8;
29323    const ENCODED_LEN: usize = 8usize;
29324    fn deser(
29325        _version: MavlinkVersion,
29326        __input: &[u8],
29327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29328        let avail_len = __input.len();
29329        let mut payload_buf = [0; Self::ENCODED_LEN];
29330        let mut buf = if avail_len < Self::ENCODED_LEN {
29331            payload_buf[0..avail_len].copy_from_slice(__input);
29332            Bytes::new(&payload_buf)
29333        } else {
29334            Bytes::new(__input)
29335        };
29336        let mut __struct = Self::default();
29337        __struct.lat = buf.get_i32_le();
29338        __struct.lon = buf.get_i32_le();
29339        Ok(__struct)
29340    }
29341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29342        let mut __tmp = BytesMut::new(bytes);
29343        #[allow(clippy::absurd_extreme_comparisons)]
29344        #[allow(unused_comparisons)]
29345        if __tmp.remaining() < Self::ENCODED_LEN {
29346            panic!(
29347                "buffer is too small (need {} bytes, but got {})",
29348                Self::ENCODED_LEN,
29349                __tmp.remaining(),
29350            )
29351        }
29352        __tmp.put_i32_le(self.lat);
29353        __tmp.put_i32_le(self.lon);
29354        if matches!(version, MavlinkVersion::V2) {
29355            let len = __tmp.len();
29356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29357        } else {
29358            __tmp.len()
29359        }
29360    }
29361}
29362#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29363#[doc = ""]
29364#[doc = "ID: 134"]
29365#[derive(Debug, Clone, PartialEq)]
29366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29368#[cfg_attr(feature = "ts", derive(TS))]
29369#[cfg_attr(feature = "ts", ts(export))]
29370pub struct TERRAIN_DATA_DATA {
29371    #[doc = "Latitude of SW corner of first grid"]
29372    pub lat: i32,
29373    #[doc = "Longitude of SW corner of first grid"]
29374    pub lon: i32,
29375    #[doc = "Grid spacing"]
29376    pub grid_spacing: u16,
29377    #[doc = "Terrain data MSL"]
29378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29379    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29380    pub data: [i16; 16],
29381    #[doc = "bit within the terrain request mask"]
29382    pub gridbit: u8,
29383}
29384impl TERRAIN_DATA_DATA {
29385    pub const ENCODED_LEN: usize = 43usize;
29386    pub const DEFAULT: Self = Self {
29387        lat: 0_i32,
29388        lon: 0_i32,
29389        grid_spacing: 0_u16,
29390        data: [0_i16; 16usize],
29391        gridbit: 0_u8,
29392    };
29393    #[cfg(feature = "arbitrary")]
29394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29395        use arbitrary::{Arbitrary, Unstructured};
29396        let mut buf = [0u8; 1024];
29397        rng.fill_bytes(&mut buf);
29398        let mut unstructured = Unstructured::new(&buf);
29399        Self::arbitrary(&mut unstructured).unwrap_or_default()
29400    }
29401}
29402impl Default for TERRAIN_DATA_DATA {
29403    fn default() -> Self {
29404        Self::DEFAULT.clone()
29405    }
29406}
29407impl MessageData for TERRAIN_DATA_DATA {
29408    type Message = MavMessage;
29409    const ID: u32 = 134u32;
29410    const NAME: &'static str = "TERRAIN_DATA";
29411    const EXTRA_CRC: u8 = 229u8;
29412    const ENCODED_LEN: usize = 43usize;
29413    fn deser(
29414        _version: MavlinkVersion,
29415        __input: &[u8],
29416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29417        let avail_len = __input.len();
29418        let mut payload_buf = [0; Self::ENCODED_LEN];
29419        let mut buf = if avail_len < Self::ENCODED_LEN {
29420            payload_buf[0..avail_len].copy_from_slice(__input);
29421            Bytes::new(&payload_buf)
29422        } else {
29423            Bytes::new(__input)
29424        };
29425        let mut __struct = Self::default();
29426        __struct.lat = buf.get_i32_le();
29427        __struct.lon = buf.get_i32_le();
29428        __struct.grid_spacing = buf.get_u16_le();
29429        for v in &mut __struct.data {
29430            let val = buf.get_i16_le();
29431            *v = val;
29432        }
29433        __struct.gridbit = buf.get_u8();
29434        Ok(__struct)
29435    }
29436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29437        let mut __tmp = BytesMut::new(bytes);
29438        #[allow(clippy::absurd_extreme_comparisons)]
29439        #[allow(unused_comparisons)]
29440        if __tmp.remaining() < Self::ENCODED_LEN {
29441            panic!(
29442                "buffer is too small (need {} bytes, but got {})",
29443                Self::ENCODED_LEN,
29444                __tmp.remaining(),
29445            )
29446        }
29447        __tmp.put_i32_le(self.lat);
29448        __tmp.put_i32_le(self.lon);
29449        __tmp.put_u16_le(self.grid_spacing);
29450        for val in &self.data {
29451            __tmp.put_i16_le(*val);
29452        }
29453        __tmp.put_u8(self.gridbit);
29454        if matches!(version, MavlinkVersion::V2) {
29455            let len = __tmp.len();
29456            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29457        } else {
29458            __tmp.len()
29459        }
29460    }
29461}
29462#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29463#[doc = ""]
29464#[doc = "ID: 136"]
29465#[derive(Debug, Clone, PartialEq)]
29466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29468#[cfg_attr(feature = "ts", derive(TS))]
29469#[cfg_attr(feature = "ts", ts(export))]
29470pub struct TERRAIN_REPORT_DATA {
29471    #[doc = "Latitude"]
29472    pub lat: i32,
29473    #[doc = "Longitude"]
29474    pub lon: i32,
29475    #[doc = "Terrain height MSL"]
29476    pub terrain_height: f32,
29477    #[doc = "Current vehicle height above lat/lon terrain height"]
29478    pub current_height: f32,
29479    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29480    pub spacing: u16,
29481    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29482    pub pending: u16,
29483    #[doc = "Number of 4x4 terrain blocks in memory"]
29484    pub loaded: u16,
29485}
29486impl TERRAIN_REPORT_DATA {
29487    pub const ENCODED_LEN: usize = 22usize;
29488    pub const DEFAULT: Self = Self {
29489        lat: 0_i32,
29490        lon: 0_i32,
29491        terrain_height: 0.0_f32,
29492        current_height: 0.0_f32,
29493        spacing: 0_u16,
29494        pending: 0_u16,
29495        loaded: 0_u16,
29496    };
29497    #[cfg(feature = "arbitrary")]
29498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29499        use arbitrary::{Arbitrary, Unstructured};
29500        let mut buf = [0u8; 1024];
29501        rng.fill_bytes(&mut buf);
29502        let mut unstructured = Unstructured::new(&buf);
29503        Self::arbitrary(&mut unstructured).unwrap_or_default()
29504    }
29505}
29506impl Default for TERRAIN_REPORT_DATA {
29507    fn default() -> Self {
29508        Self::DEFAULT.clone()
29509    }
29510}
29511impl MessageData for TERRAIN_REPORT_DATA {
29512    type Message = MavMessage;
29513    const ID: u32 = 136u32;
29514    const NAME: &'static str = "TERRAIN_REPORT";
29515    const EXTRA_CRC: u8 = 1u8;
29516    const ENCODED_LEN: usize = 22usize;
29517    fn deser(
29518        _version: MavlinkVersion,
29519        __input: &[u8],
29520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29521        let avail_len = __input.len();
29522        let mut payload_buf = [0; Self::ENCODED_LEN];
29523        let mut buf = if avail_len < Self::ENCODED_LEN {
29524            payload_buf[0..avail_len].copy_from_slice(__input);
29525            Bytes::new(&payload_buf)
29526        } else {
29527            Bytes::new(__input)
29528        };
29529        let mut __struct = Self::default();
29530        __struct.lat = buf.get_i32_le();
29531        __struct.lon = buf.get_i32_le();
29532        __struct.terrain_height = buf.get_f32_le();
29533        __struct.current_height = buf.get_f32_le();
29534        __struct.spacing = buf.get_u16_le();
29535        __struct.pending = buf.get_u16_le();
29536        __struct.loaded = buf.get_u16_le();
29537        Ok(__struct)
29538    }
29539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29540        let mut __tmp = BytesMut::new(bytes);
29541        #[allow(clippy::absurd_extreme_comparisons)]
29542        #[allow(unused_comparisons)]
29543        if __tmp.remaining() < Self::ENCODED_LEN {
29544            panic!(
29545                "buffer is too small (need {} bytes, but got {})",
29546                Self::ENCODED_LEN,
29547                __tmp.remaining(),
29548            )
29549        }
29550        __tmp.put_i32_le(self.lat);
29551        __tmp.put_i32_le(self.lon);
29552        __tmp.put_f32_le(self.terrain_height);
29553        __tmp.put_f32_le(self.current_height);
29554        __tmp.put_u16_le(self.spacing);
29555        __tmp.put_u16_le(self.pending);
29556        __tmp.put_u16_le(self.loaded);
29557        if matches!(version, MavlinkVersion::V2) {
29558            let len = __tmp.len();
29559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29560        } else {
29561            __tmp.len()
29562        }
29563    }
29564}
29565#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29566#[doc = ""]
29567#[doc = "ID: 133"]
29568#[derive(Debug, Clone, PartialEq)]
29569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29571#[cfg_attr(feature = "ts", derive(TS))]
29572#[cfg_attr(feature = "ts", ts(export))]
29573pub struct TERRAIN_REQUEST_DATA {
29574    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29575    pub mask: u64,
29576    #[doc = "Latitude of SW corner of first grid"]
29577    pub lat: i32,
29578    #[doc = "Longitude of SW corner of first grid"]
29579    pub lon: i32,
29580    #[doc = "Grid spacing"]
29581    pub grid_spacing: u16,
29582}
29583impl TERRAIN_REQUEST_DATA {
29584    pub const ENCODED_LEN: usize = 18usize;
29585    pub const DEFAULT: Self = Self {
29586        mask: 0_u64,
29587        lat: 0_i32,
29588        lon: 0_i32,
29589        grid_spacing: 0_u16,
29590    };
29591    #[cfg(feature = "arbitrary")]
29592    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29593        use arbitrary::{Arbitrary, Unstructured};
29594        let mut buf = [0u8; 1024];
29595        rng.fill_bytes(&mut buf);
29596        let mut unstructured = Unstructured::new(&buf);
29597        Self::arbitrary(&mut unstructured).unwrap_or_default()
29598    }
29599}
29600impl Default for TERRAIN_REQUEST_DATA {
29601    fn default() -> Self {
29602        Self::DEFAULT.clone()
29603    }
29604}
29605impl MessageData for TERRAIN_REQUEST_DATA {
29606    type Message = MavMessage;
29607    const ID: u32 = 133u32;
29608    const NAME: &'static str = "TERRAIN_REQUEST";
29609    const EXTRA_CRC: u8 = 6u8;
29610    const ENCODED_LEN: usize = 18usize;
29611    fn deser(
29612        _version: MavlinkVersion,
29613        __input: &[u8],
29614    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29615        let avail_len = __input.len();
29616        let mut payload_buf = [0; Self::ENCODED_LEN];
29617        let mut buf = if avail_len < Self::ENCODED_LEN {
29618            payload_buf[0..avail_len].copy_from_slice(__input);
29619            Bytes::new(&payload_buf)
29620        } else {
29621            Bytes::new(__input)
29622        };
29623        let mut __struct = Self::default();
29624        __struct.mask = buf.get_u64_le();
29625        __struct.lat = buf.get_i32_le();
29626        __struct.lon = buf.get_i32_le();
29627        __struct.grid_spacing = buf.get_u16_le();
29628        Ok(__struct)
29629    }
29630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29631        let mut __tmp = BytesMut::new(bytes);
29632        #[allow(clippy::absurd_extreme_comparisons)]
29633        #[allow(unused_comparisons)]
29634        if __tmp.remaining() < Self::ENCODED_LEN {
29635            panic!(
29636                "buffer is too small (need {} bytes, but got {})",
29637                Self::ENCODED_LEN,
29638                __tmp.remaining(),
29639            )
29640        }
29641        __tmp.put_u64_le(self.mask);
29642        __tmp.put_i32_le(self.lat);
29643        __tmp.put_i32_le(self.lon);
29644        __tmp.put_u16_le(self.grid_spacing);
29645        if matches!(version, MavlinkVersion::V2) {
29646            let len = __tmp.len();
29647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29648        } else {
29649            __tmp.len()
29650        }
29651    }
29652}
29653#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29654#[doc = ""]
29655#[doc = "ID: 111"]
29656#[derive(Debug, Clone, PartialEq)]
29657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29659#[cfg_attr(feature = "ts", derive(TS))]
29660#[cfg_attr(feature = "ts", ts(export))]
29661pub struct TIMESYNC_DATA {
29662    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29663    pub tc1: i64,
29664    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29665    pub ts1: i64,
29666    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29668    pub target_system: u8,
29669    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29670    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29671    pub target_component: u8,
29672}
29673impl TIMESYNC_DATA {
29674    pub const ENCODED_LEN: usize = 18usize;
29675    pub const DEFAULT: Self = Self {
29676        tc1: 0_i64,
29677        ts1: 0_i64,
29678        target_system: 0_u8,
29679        target_component: 0_u8,
29680    };
29681    #[cfg(feature = "arbitrary")]
29682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29683        use arbitrary::{Arbitrary, Unstructured};
29684        let mut buf = [0u8; 1024];
29685        rng.fill_bytes(&mut buf);
29686        let mut unstructured = Unstructured::new(&buf);
29687        Self::arbitrary(&mut unstructured).unwrap_or_default()
29688    }
29689}
29690impl Default for TIMESYNC_DATA {
29691    fn default() -> Self {
29692        Self::DEFAULT.clone()
29693    }
29694}
29695impl MessageData for TIMESYNC_DATA {
29696    type Message = MavMessage;
29697    const ID: u32 = 111u32;
29698    const NAME: &'static str = "TIMESYNC";
29699    const EXTRA_CRC: u8 = 34u8;
29700    const ENCODED_LEN: usize = 18usize;
29701    fn deser(
29702        _version: MavlinkVersion,
29703        __input: &[u8],
29704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29705        let avail_len = __input.len();
29706        let mut payload_buf = [0; Self::ENCODED_LEN];
29707        let mut buf = if avail_len < Self::ENCODED_LEN {
29708            payload_buf[0..avail_len].copy_from_slice(__input);
29709            Bytes::new(&payload_buf)
29710        } else {
29711            Bytes::new(__input)
29712        };
29713        let mut __struct = Self::default();
29714        __struct.tc1 = buf.get_i64_le();
29715        __struct.ts1 = buf.get_i64_le();
29716        __struct.target_system = buf.get_u8();
29717        __struct.target_component = buf.get_u8();
29718        Ok(__struct)
29719    }
29720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29721        let mut __tmp = BytesMut::new(bytes);
29722        #[allow(clippy::absurd_extreme_comparisons)]
29723        #[allow(unused_comparisons)]
29724        if __tmp.remaining() < Self::ENCODED_LEN {
29725            panic!(
29726                "buffer is too small (need {} bytes, but got {})",
29727                Self::ENCODED_LEN,
29728                __tmp.remaining(),
29729            )
29730        }
29731        __tmp.put_i64_le(self.tc1);
29732        __tmp.put_i64_le(self.ts1);
29733        if matches!(version, MavlinkVersion::V2) {
29734            __tmp.put_u8(self.target_system);
29735            __tmp.put_u8(self.target_component);
29736            let len = __tmp.len();
29737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29738        } else {
29739            __tmp.len()
29740        }
29741    }
29742}
29743#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29744#[doc = ""]
29745#[doc = "ID: 380"]
29746#[derive(Debug, Clone, PartialEq)]
29747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29749#[cfg_attr(feature = "ts", derive(TS))]
29750#[cfg_attr(feature = "ts", ts(export))]
29751pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29752    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29753    pub safe_return: i32,
29754    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29755    pub land: i32,
29756    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29757    pub mission_next_item: i32,
29758    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29759    pub mission_end: i32,
29760    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29761    pub commanded_action: i32,
29762}
29763impl TIME_ESTIMATE_TO_TARGET_DATA {
29764    pub const ENCODED_LEN: usize = 20usize;
29765    pub const DEFAULT: Self = Self {
29766        safe_return: 0_i32,
29767        land: 0_i32,
29768        mission_next_item: 0_i32,
29769        mission_end: 0_i32,
29770        commanded_action: 0_i32,
29771    };
29772    #[cfg(feature = "arbitrary")]
29773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29774        use arbitrary::{Arbitrary, Unstructured};
29775        let mut buf = [0u8; 1024];
29776        rng.fill_bytes(&mut buf);
29777        let mut unstructured = Unstructured::new(&buf);
29778        Self::arbitrary(&mut unstructured).unwrap_or_default()
29779    }
29780}
29781impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29782    fn default() -> Self {
29783        Self::DEFAULT.clone()
29784    }
29785}
29786impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29787    type Message = MavMessage;
29788    const ID: u32 = 380u32;
29789    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29790    const EXTRA_CRC: u8 = 232u8;
29791    const ENCODED_LEN: usize = 20usize;
29792    fn deser(
29793        _version: MavlinkVersion,
29794        __input: &[u8],
29795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29796        let avail_len = __input.len();
29797        let mut payload_buf = [0; Self::ENCODED_LEN];
29798        let mut buf = if avail_len < Self::ENCODED_LEN {
29799            payload_buf[0..avail_len].copy_from_slice(__input);
29800            Bytes::new(&payload_buf)
29801        } else {
29802            Bytes::new(__input)
29803        };
29804        let mut __struct = Self::default();
29805        __struct.safe_return = buf.get_i32_le();
29806        __struct.land = buf.get_i32_le();
29807        __struct.mission_next_item = buf.get_i32_le();
29808        __struct.mission_end = buf.get_i32_le();
29809        __struct.commanded_action = buf.get_i32_le();
29810        Ok(__struct)
29811    }
29812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29813        let mut __tmp = BytesMut::new(bytes);
29814        #[allow(clippy::absurd_extreme_comparisons)]
29815        #[allow(unused_comparisons)]
29816        if __tmp.remaining() < Self::ENCODED_LEN {
29817            panic!(
29818                "buffer is too small (need {} bytes, but got {})",
29819                Self::ENCODED_LEN,
29820                __tmp.remaining(),
29821            )
29822        }
29823        __tmp.put_i32_le(self.safe_return);
29824        __tmp.put_i32_le(self.land);
29825        __tmp.put_i32_le(self.mission_next_item);
29826        __tmp.put_i32_le(self.mission_end);
29827        __tmp.put_i32_le(self.commanded_action);
29828        if matches!(version, MavlinkVersion::V2) {
29829            let len = __tmp.len();
29830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29831        } else {
29832            __tmp.len()
29833        }
29834    }
29835}
29836#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29837#[doc = ""]
29838#[doc = "ID: 333"]
29839#[derive(Debug, Clone, PartialEq)]
29840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29842#[cfg_attr(feature = "ts", derive(TS))]
29843#[cfg_attr(feature = "ts", ts(export))]
29844pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29845    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29846    pub time_usec: u64,
29847    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29850    pub pos_x: [f32; 5],
29851    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29853    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29854    pub pos_y: [f32; 5],
29855    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29856    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29857    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29858    pub pos_z: [f32; 5],
29859    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29862    pub delta: [f32; 5],
29863    #[doc = "Yaw. Set to NaN for unchanged"]
29864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29865    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29866    pub pos_yaw: [f32; 5],
29867    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29868    pub valid_points: u8,
29869}
29870impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29871    pub const ENCODED_LEN: usize = 109usize;
29872    pub const DEFAULT: Self = Self {
29873        time_usec: 0_u64,
29874        pos_x: [0.0_f32; 5usize],
29875        pos_y: [0.0_f32; 5usize],
29876        pos_z: [0.0_f32; 5usize],
29877        delta: [0.0_f32; 5usize],
29878        pos_yaw: [0.0_f32; 5usize],
29879        valid_points: 0_u8,
29880    };
29881    #[cfg(feature = "arbitrary")]
29882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29883        use arbitrary::{Arbitrary, Unstructured};
29884        let mut buf = [0u8; 1024];
29885        rng.fill_bytes(&mut buf);
29886        let mut unstructured = Unstructured::new(&buf);
29887        Self::arbitrary(&mut unstructured).unwrap_or_default()
29888    }
29889}
29890impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29891    fn default() -> Self {
29892        Self::DEFAULT.clone()
29893    }
29894}
29895impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29896    type Message = MavMessage;
29897    const ID: u32 = 333u32;
29898    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29899    const EXTRA_CRC: u8 = 231u8;
29900    const ENCODED_LEN: usize = 109usize;
29901    fn deser(
29902        _version: MavlinkVersion,
29903        __input: &[u8],
29904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29905        let avail_len = __input.len();
29906        let mut payload_buf = [0; Self::ENCODED_LEN];
29907        let mut buf = if avail_len < Self::ENCODED_LEN {
29908            payload_buf[0..avail_len].copy_from_slice(__input);
29909            Bytes::new(&payload_buf)
29910        } else {
29911            Bytes::new(__input)
29912        };
29913        let mut __struct = Self::default();
29914        __struct.time_usec = buf.get_u64_le();
29915        for v in &mut __struct.pos_x {
29916            let val = buf.get_f32_le();
29917            *v = val;
29918        }
29919        for v in &mut __struct.pos_y {
29920            let val = buf.get_f32_le();
29921            *v = val;
29922        }
29923        for v in &mut __struct.pos_z {
29924            let val = buf.get_f32_le();
29925            *v = val;
29926        }
29927        for v in &mut __struct.delta {
29928            let val = buf.get_f32_le();
29929            *v = val;
29930        }
29931        for v in &mut __struct.pos_yaw {
29932            let val = buf.get_f32_le();
29933            *v = val;
29934        }
29935        __struct.valid_points = buf.get_u8();
29936        Ok(__struct)
29937    }
29938    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29939        let mut __tmp = BytesMut::new(bytes);
29940        #[allow(clippy::absurd_extreme_comparisons)]
29941        #[allow(unused_comparisons)]
29942        if __tmp.remaining() < Self::ENCODED_LEN {
29943            panic!(
29944                "buffer is too small (need {} bytes, but got {})",
29945                Self::ENCODED_LEN,
29946                __tmp.remaining(),
29947            )
29948        }
29949        __tmp.put_u64_le(self.time_usec);
29950        for val in &self.pos_x {
29951            __tmp.put_f32_le(*val);
29952        }
29953        for val in &self.pos_y {
29954            __tmp.put_f32_le(*val);
29955        }
29956        for val in &self.pos_z {
29957            __tmp.put_f32_le(*val);
29958        }
29959        for val in &self.delta {
29960            __tmp.put_f32_le(*val);
29961        }
29962        for val in &self.pos_yaw {
29963            __tmp.put_f32_le(*val);
29964        }
29965        __tmp.put_u8(self.valid_points);
29966        if matches!(version, MavlinkVersion::V2) {
29967            let len = __tmp.len();
29968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29969        } else {
29970            __tmp.len()
29971        }
29972    }
29973}
29974#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29975#[doc = ""]
29976#[doc = "ID: 332"]
29977#[derive(Debug, Clone, PartialEq)]
29978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29980#[cfg_attr(feature = "ts", derive(TS))]
29981#[cfg_attr(feature = "ts", ts(export))]
29982pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29983    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29984    pub time_usec: u64,
29985    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29987    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29988    pub pos_x: [f32; 5],
29989    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29991    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29992    pub pos_y: [f32; 5],
29993    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29996    pub pos_z: [f32; 5],
29997    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29999    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30000    pub vel_x: [f32; 5],
30001    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30003    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30004    pub vel_y: [f32; 5],
30005    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30008    pub vel_z: [f32; 5],
30009    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30011    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30012    pub acc_x: [f32; 5],
30013    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30016    pub acc_y: [f32; 5],
30017    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30020    pub acc_z: [f32; 5],
30021    #[doc = "Yaw angle, set to NaN if not being used"]
30022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30024    pub pos_yaw: [f32; 5],
30025    #[doc = "Yaw rate, set to NaN if not being used"]
30026    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30027    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30028    pub vel_yaw: [f32; 5],
30029    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30031    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30032    pub command: [u16; 5],
30033    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30034    pub valid_points: u8,
30035}
30036impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30037    pub const ENCODED_LEN: usize = 239usize;
30038    pub const DEFAULT: Self = Self {
30039        time_usec: 0_u64,
30040        pos_x: [0.0_f32; 5usize],
30041        pos_y: [0.0_f32; 5usize],
30042        pos_z: [0.0_f32; 5usize],
30043        vel_x: [0.0_f32; 5usize],
30044        vel_y: [0.0_f32; 5usize],
30045        vel_z: [0.0_f32; 5usize],
30046        acc_x: [0.0_f32; 5usize],
30047        acc_y: [0.0_f32; 5usize],
30048        acc_z: [0.0_f32; 5usize],
30049        pos_yaw: [0.0_f32; 5usize],
30050        vel_yaw: [0.0_f32; 5usize],
30051        command: [0_u16; 5usize],
30052        valid_points: 0_u8,
30053    };
30054    #[cfg(feature = "arbitrary")]
30055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30056        use arbitrary::{Arbitrary, Unstructured};
30057        let mut buf = [0u8; 1024];
30058        rng.fill_bytes(&mut buf);
30059        let mut unstructured = Unstructured::new(&buf);
30060        Self::arbitrary(&mut unstructured).unwrap_or_default()
30061    }
30062}
30063impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30064    fn default() -> Self {
30065        Self::DEFAULT.clone()
30066    }
30067}
30068impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30069    type Message = MavMessage;
30070    const ID: u32 = 332u32;
30071    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30072    const EXTRA_CRC: u8 = 236u8;
30073    const ENCODED_LEN: usize = 239usize;
30074    fn deser(
30075        _version: MavlinkVersion,
30076        __input: &[u8],
30077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30078        let avail_len = __input.len();
30079        let mut payload_buf = [0; Self::ENCODED_LEN];
30080        let mut buf = if avail_len < Self::ENCODED_LEN {
30081            payload_buf[0..avail_len].copy_from_slice(__input);
30082            Bytes::new(&payload_buf)
30083        } else {
30084            Bytes::new(__input)
30085        };
30086        let mut __struct = Self::default();
30087        __struct.time_usec = buf.get_u64_le();
30088        for v in &mut __struct.pos_x {
30089            let val = buf.get_f32_le();
30090            *v = val;
30091        }
30092        for v in &mut __struct.pos_y {
30093            let val = buf.get_f32_le();
30094            *v = val;
30095        }
30096        for v in &mut __struct.pos_z {
30097            let val = buf.get_f32_le();
30098            *v = val;
30099        }
30100        for v in &mut __struct.vel_x {
30101            let val = buf.get_f32_le();
30102            *v = val;
30103        }
30104        for v in &mut __struct.vel_y {
30105            let val = buf.get_f32_le();
30106            *v = val;
30107        }
30108        for v in &mut __struct.vel_z {
30109            let val = buf.get_f32_le();
30110            *v = val;
30111        }
30112        for v in &mut __struct.acc_x {
30113            let val = buf.get_f32_le();
30114            *v = val;
30115        }
30116        for v in &mut __struct.acc_y {
30117            let val = buf.get_f32_le();
30118            *v = val;
30119        }
30120        for v in &mut __struct.acc_z {
30121            let val = buf.get_f32_le();
30122            *v = val;
30123        }
30124        for v in &mut __struct.pos_yaw {
30125            let val = buf.get_f32_le();
30126            *v = val;
30127        }
30128        for v in &mut __struct.vel_yaw {
30129            let val = buf.get_f32_le();
30130            *v = val;
30131        }
30132        for v in &mut __struct.command {
30133            let val = buf.get_u16_le();
30134            *v = val;
30135        }
30136        __struct.valid_points = buf.get_u8();
30137        Ok(__struct)
30138    }
30139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30140        let mut __tmp = BytesMut::new(bytes);
30141        #[allow(clippy::absurd_extreme_comparisons)]
30142        #[allow(unused_comparisons)]
30143        if __tmp.remaining() < Self::ENCODED_LEN {
30144            panic!(
30145                "buffer is too small (need {} bytes, but got {})",
30146                Self::ENCODED_LEN,
30147                __tmp.remaining(),
30148            )
30149        }
30150        __tmp.put_u64_le(self.time_usec);
30151        for val in &self.pos_x {
30152            __tmp.put_f32_le(*val);
30153        }
30154        for val in &self.pos_y {
30155            __tmp.put_f32_le(*val);
30156        }
30157        for val in &self.pos_z {
30158            __tmp.put_f32_le(*val);
30159        }
30160        for val in &self.vel_x {
30161            __tmp.put_f32_le(*val);
30162        }
30163        for val in &self.vel_y {
30164            __tmp.put_f32_le(*val);
30165        }
30166        for val in &self.vel_z {
30167            __tmp.put_f32_le(*val);
30168        }
30169        for val in &self.acc_x {
30170            __tmp.put_f32_le(*val);
30171        }
30172        for val in &self.acc_y {
30173            __tmp.put_f32_le(*val);
30174        }
30175        for val in &self.acc_z {
30176            __tmp.put_f32_le(*val);
30177        }
30178        for val in &self.pos_yaw {
30179            __tmp.put_f32_le(*val);
30180        }
30181        for val in &self.vel_yaw {
30182            __tmp.put_f32_le(*val);
30183        }
30184        for val in &self.command {
30185            __tmp.put_u16_le(*val);
30186        }
30187        __tmp.put_u8(self.valid_points);
30188        if matches!(version, MavlinkVersion::V2) {
30189            let len = __tmp.len();
30190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30191        } else {
30192            __tmp.len()
30193        }
30194    }
30195}
30196#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30197#[doc = ""]
30198#[doc = "ID: 385"]
30199#[derive(Debug, Clone, PartialEq)]
30200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30202#[cfg_attr(feature = "ts", derive(TS))]
30203#[cfg_attr(feature = "ts", ts(export))]
30204pub struct TUNNEL_DATA {
30205    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30206    pub payload_type: MavTunnelPayloadType,
30207    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30208    pub target_system: u8,
30209    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30210    pub target_component: u8,
30211    #[doc = "Length of the data transported in payload"]
30212    pub payload_length: u8,
30213    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30216    pub payload: [u8; 128],
30217}
30218impl TUNNEL_DATA {
30219    pub const ENCODED_LEN: usize = 133usize;
30220    pub const DEFAULT: Self = Self {
30221        payload_type: MavTunnelPayloadType::DEFAULT,
30222        target_system: 0_u8,
30223        target_component: 0_u8,
30224        payload_length: 0_u8,
30225        payload: [0_u8; 128usize],
30226    };
30227    #[cfg(feature = "arbitrary")]
30228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30229        use arbitrary::{Arbitrary, Unstructured};
30230        let mut buf = [0u8; 1024];
30231        rng.fill_bytes(&mut buf);
30232        let mut unstructured = Unstructured::new(&buf);
30233        Self::arbitrary(&mut unstructured).unwrap_or_default()
30234    }
30235}
30236impl Default for TUNNEL_DATA {
30237    fn default() -> Self {
30238        Self::DEFAULT.clone()
30239    }
30240}
30241impl MessageData for TUNNEL_DATA {
30242    type Message = MavMessage;
30243    const ID: u32 = 385u32;
30244    const NAME: &'static str = "TUNNEL";
30245    const EXTRA_CRC: u8 = 147u8;
30246    const ENCODED_LEN: usize = 133usize;
30247    fn deser(
30248        _version: MavlinkVersion,
30249        __input: &[u8],
30250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30251        let avail_len = __input.len();
30252        let mut payload_buf = [0; Self::ENCODED_LEN];
30253        let mut buf = if avail_len < Self::ENCODED_LEN {
30254            payload_buf[0..avail_len].copy_from_slice(__input);
30255            Bytes::new(&payload_buf)
30256        } else {
30257            Bytes::new(__input)
30258        };
30259        let mut __struct = Self::default();
30260        let tmp = buf.get_u16_le();
30261        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30262            ::mavlink_core::error::ParserError::InvalidEnum {
30263                enum_type: "MavTunnelPayloadType",
30264                value: tmp as u32,
30265            },
30266        )?;
30267        __struct.target_system = buf.get_u8();
30268        __struct.target_component = buf.get_u8();
30269        __struct.payload_length = buf.get_u8();
30270        for v in &mut __struct.payload {
30271            let val = buf.get_u8();
30272            *v = val;
30273        }
30274        Ok(__struct)
30275    }
30276    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30277        let mut __tmp = BytesMut::new(bytes);
30278        #[allow(clippy::absurd_extreme_comparisons)]
30279        #[allow(unused_comparisons)]
30280        if __tmp.remaining() < Self::ENCODED_LEN {
30281            panic!(
30282                "buffer is too small (need {} bytes, but got {})",
30283                Self::ENCODED_LEN,
30284                __tmp.remaining(),
30285            )
30286        }
30287        __tmp.put_u16_le(self.payload_type as u16);
30288        __tmp.put_u8(self.target_system);
30289        __tmp.put_u8(self.target_component);
30290        __tmp.put_u8(self.payload_length);
30291        for val in &self.payload {
30292            __tmp.put_u8(*val);
30293        }
30294        if matches!(version, MavlinkVersion::V2) {
30295            let len = __tmp.len();
30296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30297        } else {
30298            __tmp.len()
30299        }
30300    }
30301}
30302#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30303#[doc = ""]
30304#[doc = "ID: 311"]
30305#[derive(Debug, Clone, PartialEq)]
30306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30308#[cfg_attr(feature = "ts", derive(TS))]
30309#[cfg_attr(feature = "ts", ts(export))]
30310pub struct UAVCAN_NODE_INFO_DATA {
30311    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30312    pub time_usec: u64,
30313    #[doc = "Time since the start-up of the node."]
30314    pub uptime_sec: u32,
30315    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30316    pub sw_vcs_commit: u32,
30317    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30318    #[cfg_attr(feature = "ts", ts(type = "string"))]
30319    pub name: CharArray<80>,
30320    #[doc = "Hardware major version number."]
30321    pub hw_version_major: u8,
30322    #[doc = "Hardware minor version number."]
30323    pub hw_version_minor: u8,
30324    #[doc = "Hardware unique 128-bit ID."]
30325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30326    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30327    pub hw_unique_id: [u8; 16],
30328    #[doc = "Software major version number."]
30329    pub sw_version_major: u8,
30330    #[doc = "Software minor version number."]
30331    pub sw_version_minor: u8,
30332}
30333impl UAVCAN_NODE_INFO_DATA {
30334    pub const ENCODED_LEN: usize = 116usize;
30335    pub const DEFAULT: Self = Self {
30336        time_usec: 0_u64,
30337        uptime_sec: 0_u32,
30338        sw_vcs_commit: 0_u32,
30339        name: CharArray::new([0_u8; 80usize]),
30340        hw_version_major: 0_u8,
30341        hw_version_minor: 0_u8,
30342        hw_unique_id: [0_u8; 16usize],
30343        sw_version_major: 0_u8,
30344        sw_version_minor: 0_u8,
30345    };
30346    #[cfg(feature = "arbitrary")]
30347    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30348        use arbitrary::{Arbitrary, Unstructured};
30349        let mut buf = [0u8; 1024];
30350        rng.fill_bytes(&mut buf);
30351        let mut unstructured = Unstructured::new(&buf);
30352        Self::arbitrary(&mut unstructured).unwrap_or_default()
30353    }
30354}
30355impl Default for UAVCAN_NODE_INFO_DATA {
30356    fn default() -> Self {
30357        Self::DEFAULT.clone()
30358    }
30359}
30360impl MessageData for UAVCAN_NODE_INFO_DATA {
30361    type Message = MavMessage;
30362    const ID: u32 = 311u32;
30363    const NAME: &'static str = "UAVCAN_NODE_INFO";
30364    const EXTRA_CRC: u8 = 95u8;
30365    const ENCODED_LEN: usize = 116usize;
30366    fn deser(
30367        _version: MavlinkVersion,
30368        __input: &[u8],
30369    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30370        let avail_len = __input.len();
30371        let mut payload_buf = [0; Self::ENCODED_LEN];
30372        let mut buf = if avail_len < Self::ENCODED_LEN {
30373            payload_buf[0..avail_len].copy_from_slice(__input);
30374            Bytes::new(&payload_buf)
30375        } else {
30376            Bytes::new(__input)
30377        };
30378        let mut __struct = Self::default();
30379        __struct.time_usec = buf.get_u64_le();
30380        __struct.uptime_sec = buf.get_u32_le();
30381        __struct.sw_vcs_commit = buf.get_u32_le();
30382        let mut tmp = [0_u8; 80usize];
30383        for v in &mut tmp {
30384            *v = buf.get_u8();
30385        }
30386        __struct.name = CharArray::new(tmp);
30387        __struct.hw_version_major = buf.get_u8();
30388        __struct.hw_version_minor = buf.get_u8();
30389        for v in &mut __struct.hw_unique_id {
30390            let val = buf.get_u8();
30391            *v = val;
30392        }
30393        __struct.sw_version_major = buf.get_u8();
30394        __struct.sw_version_minor = buf.get_u8();
30395        Ok(__struct)
30396    }
30397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30398        let mut __tmp = BytesMut::new(bytes);
30399        #[allow(clippy::absurd_extreme_comparisons)]
30400        #[allow(unused_comparisons)]
30401        if __tmp.remaining() < Self::ENCODED_LEN {
30402            panic!(
30403                "buffer is too small (need {} bytes, but got {})",
30404                Self::ENCODED_LEN,
30405                __tmp.remaining(),
30406            )
30407        }
30408        __tmp.put_u64_le(self.time_usec);
30409        __tmp.put_u32_le(self.uptime_sec);
30410        __tmp.put_u32_le(self.sw_vcs_commit);
30411        for val in &self.name {
30412            __tmp.put_u8(*val);
30413        }
30414        __tmp.put_u8(self.hw_version_major);
30415        __tmp.put_u8(self.hw_version_minor);
30416        for val in &self.hw_unique_id {
30417            __tmp.put_u8(*val);
30418        }
30419        __tmp.put_u8(self.sw_version_major);
30420        __tmp.put_u8(self.sw_version_minor);
30421        if matches!(version, MavlinkVersion::V2) {
30422            let len = __tmp.len();
30423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30424        } else {
30425            __tmp.len()
30426        }
30427    }
30428}
30429#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30430#[doc = ""]
30431#[doc = "ID: 310"]
30432#[derive(Debug, Clone, PartialEq)]
30433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30435#[cfg_attr(feature = "ts", derive(TS))]
30436#[cfg_attr(feature = "ts", ts(export))]
30437pub struct UAVCAN_NODE_STATUS_DATA {
30438    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30439    pub time_usec: u64,
30440    #[doc = "Time since the start-up of the node."]
30441    pub uptime_sec: u32,
30442    #[doc = "Vendor-specific status information."]
30443    pub vendor_specific_status_code: u16,
30444    #[doc = "Generalized node health status."]
30445    pub health: UavcanNodeHealth,
30446    #[doc = "Generalized operating mode."]
30447    pub mode: UavcanNodeMode,
30448    #[doc = "Not used currently."]
30449    pub sub_mode: u8,
30450}
30451impl UAVCAN_NODE_STATUS_DATA {
30452    pub const ENCODED_LEN: usize = 17usize;
30453    pub const DEFAULT: Self = Self {
30454        time_usec: 0_u64,
30455        uptime_sec: 0_u32,
30456        vendor_specific_status_code: 0_u16,
30457        health: UavcanNodeHealth::DEFAULT,
30458        mode: UavcanNodeMode::DEFAULT,
30459        sub_mode: 0_u8,
30460    };
30461    #[cfg(feature = "arbitrary")]
30462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30463        use arbitrary::{Arbitrary, Unstructured};
30464        let mut buf = [0u8; 1024];
30465        rng.fill_bytes(&mut buf);
30466        let mut unstructured = Unstructured::new(&buf);
30467        Self::arbitrary(&mut unstructured).unwrap_or_default()
30468    }
30469}
30470impl Default for UAVCAN_NODE_STATUS_DATA {
30471    fn default() -> Self {
30472        Self::DEFAULT.clone()
30473    }
30474}
30475impl MessageData for UAVCAN_NODE_STATUS_DATA {
30476    type Message = MavMessage;
30477    const ID: u32 = 310u32;
30478    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30479    const EXTRA_CRC: u8 = 28u8;
30480    const ENCODED_LEN: usize = 17usize;
30481    fn deser(
30482        _version: MavlinkVersion,
30483        __input: &[u8],
30484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30485        let avail_len = __input.len();
30486        let mut payload_buf = [0; Self::ENCODED_LEN];
30487        let mut buf = if avail_len < Self::ENCODED_LEN {
30488            payload_buf[0..avail_len].copy_from_slice(__input);
30489            Bytes::new(&payload_buf)
30490        } else {
30491            Bytes::new(__input)
30492        };
30493        let mut __struct = Self::default();
30494        __struct.time_usec = buf.get_u64_le();
30495        __struct.uptime_sec = buf.get_u32_le();
30496        __struct.vendor_specific_status_code = buf.get_u16_le();
30497        let tmp = buf.get_u8();
30498        __struct.health =
30499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30500                enum_type: "UavcanNodeHealth",
30501                value: tmp as u32,
30502            })?;
30503        let tmp = buf.get_u8();
30504        __struct.mode =
30505            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30506                enum_type: "UavcanNodeMode",
30507                value: tmp as u32,
30508            })?;
30509        __struct.sub_mode = buf.get_u8();
30510        Ok(__struct)
30511    }
30512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30513        let mut __tmp = BytesMut::new(bytes);
30514        #[allow(clippy::absurd_extreme_comparisons)]
30515        #[allow(unused_comparisons)]
30516        if __tmp.remaining() < Self::ENCODED_LEN {
30517            panic!(
30518                "buffer is too small (need {} bytes, but got {})",
30519                Self::ENCODED_LEN,
30520                __tmp.remaining(),
30521            )
30522        }
30523        __tmp.put_u64_le(self.time_usec);
30524        __tmp.put_u32_le(self.uptime_sec);
30525        __tmp.put_u16_le(self.vendor_specific_status_code);
30526        __tmp.put_u8(self.health as u8);
30527        __tmp.put_u8(self.mode as u8);
30528        __tmp.put_u8(self.sub_mode);
30529        if matches!(version, MavlinkVersion::V2) {
30530            let len = __tmp.len();
30531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30532        } else {
30533            __tmp.len()
30534        }
30535    }
30536}
30537#[doc = "The global position resulting from GPS and sensor fusion."]
30538#[doc = ""]
30539#[doc = "ID: 340"]
30540#[derive(Debug, Clone, PartialEq)]
30541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30543#[cfg_attr(feature = "ts", derive(TS))]
30544#[cfg_attr(feature = "ts", ts(export))]
30545pub struct UTM_GLOBAL_POSITION_DATA {
30546    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30547    pub time: u64,
30548    #[doc = "Latitude (WGS84)"]
30549    pub lat: i32,
30550    #[doc = "Longitude (WGS84)"]
30551    pub lon: i32,
30552    #[doc = "Altitude (WGS84)"]
30553    pub alt: i32,
30554    #[doc = "Altitude above ground"]
30555    pub relative_alt: i32,
30556    #[doc = "Next waypoint, latitude (WGS84)"]
30557    pub next_lat: i32,
30558    #[doc = "Next waypoint, longitude (WGS84)"]
30559    pub next_lon: i32,
30560    #[doc = "Next waypoint, altitude (WGS84)"]
30561    pub next_alt: i32,
30562    #[doc = "Ground X speed (latitude, positive north)"]
30563    pub vx: i16,
30564    #[doc = "Ground Y speed (longitude, positive east)"]
30565    pub vy: i16,
30566    #[doc = "Ground Z speed (altitude, positive down)"]
30567    pub vz: i16,
30568    #[doc = "Horizontal position uncertainty (standard deviation)"]
30569    pub h_acc: u16,
30570    #[doc = "Altitude uncertainty (standard deviation)"]
30571    pub v_acc: u16,
30572    #[doc = "Speed uncertainty (standard deviation)"]
30573    pub vel_acc: u16,
30574    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30575    pub update_rate: u16,
30576    #[doc = "Unique UAS ID."]
30577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30578    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30579    pub uas_id: [u8; 18],
30580    #[doc = "Flight state"]
30581    pub flight_state: UtmFlightState,
30582    #[doc = "Bitwise OR combination of the data available flags."]
30583    pub flags: UtmDataAvailFlags,
30584}
30585impl UTM_GLOBAL_POSITION_DATA {
30586    pub const ENCODED_LEN: usize = 70usize;
30587    pub const DEFAULT: Self = Self {
30588        time: 0_u64,
30589        lat: 0_i32,
30590        lon: 0_i32,
30591        alt: 0_i32,
30592        relative_alt: 0_i32,
30593        next_lat: 0_i32,
30594        next_lon: 0_i32,
30595        next_alt: 0_i32,
30596        vx: 0_i16,
30597        vy: 0_i16,
30598        vz: 0_i16,
30599        h_acc: 0_u16,
30600        v_acc: 0_u16,
30601        vel_acc: 0_u16,
30602        update_rate: 0_u16,
30603        uas_id: [0_u8; 18usize],
30604        flight_state: UtmFlightState::DEFAULT,
30605        flags: UtmDataAvailFlags::DEFAULT,
30606    };
30607    #[cfg(feature = "arbitrary")]
30608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30609        use arbitrary::{Arbitrary, Unstructured};
30610        let mut buf = [0u8; 1024];
30611        rng.fill_bytes(&mut buf);
30612        let mut unstructured = Unstructured::new(&buf);
30613        Self::arbitrary(&mut unstructured).unwrap_or_default()
30614    }
30615}
30616impl Default for UTM_GLOBAL_POSITION_DATA {
30617    fn default() -> Self {
30618        Self::DEFAULT.clone()
30619    }
30620}
30621impl MessageData for UTM_GLOBAL_POSITION_DATA {
30622    type Message = MavMessage;
30623    const ID: u32 = 340u32;
30624    const NAME: &'static str = "UTM_GLOBAL_POSITION";
30625    const EXTRA_CRC: u8 = 99u8;
30626    const ENCODED_LEN: usize = 70usize;
30627    fn deser(
30628        _version: MavlinkVersion,
30629        __input: &[u8],
30630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30631        let avail_len = __input.len();
30632        let mut payload_buf = [0; Self::ENCODED_LEN];
30633        let mut buf = if avail_len < Self::ENCODED_LEN {
30634            payload_buf[0..avail_len].copy_from_slice(__input);
30635            Bytes::new(&payload_buf)
30636        } else {
30637            Bytes::new(__input)
30638        };
30639        let mut __struct = Self::default();
30640        __struct.time = buf.get_u64_le();
30641        __struct.lat = buf.get_i32_le();
30642        __struct.lon = buf.get_i32_le();
30643        __struct.alt = buf.get_i32_le();
30644        __struct.relative_alt = buf.get_i32_le();
30645        __struct.next_lat = buf.get_i32_le();
30646        __struct.next_lon = buf.get_i32_le();
30647        __struct.next_alt = buf.get_i32_le();
30648        __struct.vx = buf.get_i16_le();
30649        __struct.vy = buf.get_i16_le();
30650        __struct.vz = buf.get_i16_le();
30651        __struct.h_acc = buf.get_u16_le();
30652        __struct.v_acc = buf.get_u16_le();
30653        __struct.vel_acc = buf.get_u16_le();
30654        __struct.update_rate = buf.get_u16_le();
30655        for v in &mut __struct.uas_id {
30656            let val = buf.get_u8();
30657            *v = val;
30658        }
30659        let tmp = buf.get_u8();
30660        __struct.flight_state =
30661            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30662                enum_type: "UtmFlightState",
30663                value: tmp as u32,
30664            })?;
30665        let tmp = buf.get_u8();
30666        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
30667            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30668                flag_type: "UtmDataAvailFlags",
30669                value: tmp as u32,
30670            })?;
30671        Ok(__struct)
30672    }
30673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30674        let mut __tmp = BytesMut::new(bytes);
30675        #[allow(clippy::absurd_extreme_comparisons)]
30676        #[allow(unused_comparisons)]
30677        if __tmp.remaining() < Self::ENCODED_LEN {
30678            panic!(
30679                "buffer is too small (need {} bytes, but got {})",
30680                Self::ENCODED_LEN,
30681                __tmp.remaining(),
30682            )
30683        }
30684        __tmp.put_u64_le(self.time);
30685        __tmp.put_i32_le(self.lat);
30686        __tmp.put_i32_le(self.lon);
30687        __tmp.put_i32_le(self.alt);
30688        __tmp.put_i32_le(self.relative_alt);
30689        __tmp.put_i32_le(self.next_lat);
30690        __tmp.put_i32_le(self.next_lon);
30691        __tmp.put_i32_le(self.next_alt);
30692        __tmp.put_i16_le(self.vx);
30693        __tmp.put_i16_le(self.vy);
30694        __tmp.put_i16_le(self.vz);
30695        __tmp.put_u16_le(self.h_acc);
30696        __tmp.put_u16_le(self.v_acc);
30697        __tmp.put_u16_le(self.vel_acc);
30698        __tmp.put_u16_le(self.update_rate);
30699        for val in &self.uas_id {
30700            __tmp.put_u8(*val);
30701        }
30702        __tmp.put_u8(self.flight_state as u8);
30703        __tmp.put_u8(self.flags.bits());
30704        if matches!(version, MavlinkVersion::V2) {
30705            let len = __tmp.len();
30706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30707        } else {
30708            __tmp.len()
30709        }
30710    }
30711}
30712#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30713#[doc = ""]
30714#[doc = "ID: 248"]
30715#[derive(Debug, Clone, PartialEq)]
30716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30718#[cfg_attr(feature = "ts", derive(TS))]
30719#[cfg_attr(feature = "ts", ts(export))]
30720pub struct V2_EXTENSION_DATA {
30721    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30722    pub message_type: u16,
30723    #[doc = "Network ID (0 for broadcast)"]
30724    pub target_network: u8,
30725    #[doc = "System ID (0 for broadcast)"]
30726    pub target_system: u8,
30727    #[doc = "Component ID (0 for broadcast)"]
30728    pub target_component: u8,
30729    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30732    pub payload: [u8; 249],
30733}
30734impl V2_EXTENSION_DATA {
30735    pub const ENCODED_LEN: usize = 254usize;
30736    pub const DEFAULT: Self = Self {
30737        message_type: 0_u16,
30738        target_network: 0_u8,
30739        target_system: 0_u8,
30740        target_component: 0_u8,
30741        payload: [0_u8; 249usize],
30742    };
30743    #[cfg(feature = "arbitrary")]
30744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30745        use arbitrary::{Arbitrary, Unstructured};
30746        let mut buf = [0u8; 1024];
30747        rng.fill_bytes(&mut buf);
30748        let mut unstructured = Unstructured::new(&buf);
30749        Self::arbitrary(&mut unstructured).unwrap_or_default()
30750    }
30751}
30752impl Default for V2_EXTENSION_DATA {
30753    fn default() -> Self {
30754        Self::DEFAULT.clone()
30755    }
30756}
30757impl MessageData for V2_EXTENSION_DATA {
30758    type Message = MavMessage;
30759    const ID: u32 = 248u32;
30760    const NAME: &'static str = "V2_EXTENSION";
30761    const EXTRA_CRC: u8 = 8u8;
30762    const ENCODED_LEN: usize = 254usize;
30763    fn deser(
30764        _version: MavlinkVersion,
30765        __input: &[u8],
30766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30767        let avail_len = __input.len();
30768        let mut payload_buf = [0; Self::ENCODED_LEN];
30769        let mut buf = if avail_len < Self::ENCODED_LEN {
30770            payload_buf[0..avail_len].copy_from_slice(__input);
30771            Bytes::new(&payload_buf)
30772        } else {
30773            Bytes::new(__input)
30774        };
30775        let mut __struct = Self::default();
30776        __struct.message_type = buf.get_u16_le();
30777        __struct.target_network = buf.get_u8();
30778        __struct.target_system = buf.get_u8();
30779        __struct.target_component = buf.get_u8();
30780        for v in &mut __struct.payload {
30781            let val = buf.get_u8();
30782            *v = val;
30783        }
30784        Ok(__struct)
30785    }
30786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30787        let mut __tmp = BytesMut::new(bytes);
30788        #[allow(clippy::absurd_extreme_comparisons)]
30789        #[allow(unused_comparisons)]
30790        if __tmp.remaining() < Self::ENCODED_LEN {
30791            panic!(
30792                "buffer is too small (need {} bytes, but got {})",
30793                Self::ENCODED_LEN,
30794                __tmp.remaining(),
30795            )
30796        }
30797        __tmp.put_u16_le(self.message_type);
30798        __tmp.put_u8(self.target_network);
30799        __tmp.put_u8(self.target_system);
30800        __tmp.put_u8(self.target_component);
30801        for val in &self.payload {
30802            __tmp.put_u8(*val);
30803        }
30804        if matches!(version, MavlinkVersion::V2) {
30805            let len = __tmp.len();
30806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30807        } else {
30808            __tmp.len()
30809        }
30810    }
30811}
30812#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30813#[doc = ""]
30814#[doc = "ID: 74"]
30815#[derive(Debug, Clone, PartialEq)]
30816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30818#[cfg_attr(feature = "ts", derive(TS))]
30819#[cfg_attr(feature = "ts", ts(export))]
30820pub struct VFR_HUD_DATA {
30821    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30822    pub airspeed: f32,
30823    #[doc = "Current ground speed."]
30824    pub groundspeed: f32,
30825    #[doc = "Current altitude (MSL)."]
30826    pub alt: f32,
30827    #[doc = "Current climb rate."]
30828    pub climb: f32,
30829    #[doc = "Current heading in compass units (0-360, 0=north)."]
30830    pub heading: i16,
30831    #[doc = "Current throttle setting (0 to 100)."]
30832    pub throttle: u16,
30833}
30834impl VFR_HUD_DATA {
30835    pub const ENCODED_LEN: usize = 20usize;
30836    pub const DEFAULT: Self = Self {
30837        airspeed: 0.0_f32,
30838        groundspeed: 0.0_f32,
30839        alt: 0.0_f32,
30840        climb: 0.0_f32,
30841        heading: 0_i16,
30842        throttle: 0_u16,
30843    };
30844    #[cfg(feature = "arbitrary")]
30845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30846        use arbitrary::{Arbitrary, Unstructured};
30847        let mut buf = [0u8; 1024];
30848        rng.fill_bytes(&mut buf);
30849        let mut unstructured = Unstructured::new(&buf);
30850        Self::arbitrary(&mut unstructured).unwrap_or_default()
30851    }
30852}
30853impl Default for VFR_HUD_DATA {
30854    fn default() -> Self {
30855        Self::DEFAULT.clone()
30856    }
30857}
30858impl MessageData for VFR_HUD_DATA {
30859    type Message = MavMessage;
30860    const ID: u32 = 74u32;
30861    const NAME: &'static str = "VFR_HUD";
30862    const EXTRA_CRC: u8 = 20u8;
30863    const ENCODED_LEN: usize = 20usize;
30864    fn deser(
30865        _version: MavlinkVersion,
30866        __input: &[u8],
30867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30868        let avail_len = __input.len();
30869        let mut payload_buf = [0; Self::ENCODED_LEN];
30870        let mut buf = if avail_len < Self::ENCODED_LEN {
30871            payload_buf[0..avail_len].copy_from_slice(__input);
30872            Bytes::new(&payload_buf)
30873        } else {
30874            Bytes::new(__input)
30875        };
30876        let mut __struct = Self::default();
30877        __struct.airspeed = buf.get_f32_le();
30878        __struct.groundspeed = buf.get_f32_le();
30879        __struct.alt = buf.get_f32_le();
30880        __struct.climb = buf.get_f32_le();
30881        __struct.heading = buf.get_i16_le();
30882        __struct.throttle = buf.get_u16_le();
30883        Ok(__struct)
30884    }
30885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30886        let mut __tmp = BytesMut::new(bytes);
30887        #[allow(clippy::absurd_extreme_comparisons)]
30888        #[allow(unused_comparisons)]
30889        if __tmp.remaining() < Self::ENCODED_LEN {
30890            panic!(
30891                "buffer is too small (need {} bytes, but got {})",
30892                Self::ENCODED_LEN,
30893                __tmp.remaining(),
30894            )
30895        }
30896        __tmp.put_f32_le(self.airspeed);
30897        __tmp.put_f32_le(self.groundspeed);
30898        __tmp.put_f32_le(self.alt);
30899        __tmp.put_f32_le(self.climb);
30900        __tmp.put_i16_le(self.heading);
30901        __tmp.put_u16_le(self.throttle);
30902        if matches!(version, MavlinkVersion::V2) {
30903            let len = __tmp.len();
30904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30905        } else {
30906            __tmp.len()
30907        }
30908    }
30909}
30910#[doc = "Vibration levels and accelerometer clipping."]
30911#[doc = ""]
30912#[doc = "ID: 241"]
30913#[derive(Debug, Clone, PartialEq)]
30914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30916#[cfg_attr(feature = "ts", derive(TS))]
30917#[cfg_attr(feature = "ts", ts(export))]
30918pub struct VIBRATION_DATA {
30919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30920    pub time_usec: u64,
30921    #[doc = "Vibration levels on X-axis"]
30922    pub vibration_x: f32,
30923    #[doc = "Vibration levels on Y-axis"]
30924    pub vibration_y: f32,
30925    #[doc = "Vibration levels on Z-axis"]
30926    pub vibration_z: f32,
30927    #[doc = "first accelerometer clipping count"]
30928    pub clipping_0: u32,
30929    #[doc = "second accelerometer clipping count"]
30930    pub clipping_1: u32,
30931    #[doc = "third accelerometer clipping count"]
30932    pub clipping_2: u32,
30933}
30934impl VIBRATION_DATA {
30935    pub const ENCODED_LEN: usize = 32usize;
30936    pub const DEFAULT: Self = Self {
30937        time_usec: 0_u64,
30938        vibration_x: 0.0_f32,
30939        vibration_y: 0.0_f32,
30940        vibration_z: 0.0_f32,
30941        clipping_0: 0_u32,
30942        clipping_1: 0_u32,
30943        clipping_2: 0_u32,
30944    };
30945    #[cfg(feature = "arbitrary")]
30946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30947        use arbitrary::{Arbitrary, Unstructured};
30948        let mut buf = [0u8; 1024];
30949        rng.fill_bytes(&mut buf);
30950        let mut unstructured = Unstructured::new(&buf);
30951        Self::arbitrary(&mut unstructured).unwrap_or_default()
30952    }
30953}
30954impl Default for VIBRATION_DATA {
30955    fn default() -> Self {
30956        Self::DEFAULT.clone()
30957    }
30958}
30959impl MessageData for VIBRATION_DATA {
30960    type Message = MavMessage;
30961    const ID: u32 = 241u32;
30962    const NAME: &'static str = "VIBRATION";
30963    const EXTRA_CRC: u8 = 90u8;
30964    const ENCODED_LEN: usize = 32usize;
30965    fn deser(
30966        _version: MavlinkVersion,
30967        __input: &[u8],
30968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30969        let avail_len = __input.len();
30970        let mut payload_buf = [0; Self::ENCODED_LEN];
30971        let mut buf = if avail_len < Self::ENCODED_LEN {
30972            payload_buf[0..avail_len].copy_from_slice(__input);
30973            Bytes::new(&payload_buf)
30974        } else {
30975            Bytes::new(__input)
30976        };
30977        let mut __struct = Self::default();
30978        __struct.time_usec = buf.get_u64_le();
30979        __struct.vibration_x = buf.get_f32_le();
30980        __struct.vibration_y = buf.get_f32_le();
30981        __struct.vibration_z = buf.get_f32_le();
30982        __struct.clipping_0 = buf.get_u32_le();
30983        __struct.clipping_1 = buf.get_u32_le();
30984        __struct.clipping_2 = buf.get_u32_le();
30985        Ok(__struct)
30986    }
30987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30988        let mut __tmp = BytesMut::new(bytes);
30989        #[allow(clippy::absurd_extreme_comparisons)]
30990        #[allow(unused_comparisons)]
30991        if __tmp.remaining() < Self::ENCODED_LEN {
30992            panic!(
30993                "buffer is too small (need {} bytes, but got {})",
30994                Self::ENCODED_LEN,
30995                __tmp.remaining(),
30996            )
30997        }
30998        __tmp.put_u64_le(self.time_usec);
30999        __tmp.put_f32_le(self.vibration_x);
31000        __tmp.put_f32_le(self.vibration_y);
31001        __tmp.put_f32_le(self.vibration_z);
31002        __tmp.put_u32_le(self.clipping_0);
31003        __tmp.put_u32_le(self.clipping_1);
31004        __tmp.put_u32_le(self.clipping_2);
31005        if matches!(version, MavlinkVersion::V2) {
31006            let len = __tmp.len();
31007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31008        } else {
31009            __tmp.len()
31010        }
31011    }
31012}
31013#[doc = "Global position estimate from a Vicon motion system source."]
31014#[doc = ""]
31015#[doc = "ID: 104"]
31016#[derive(Debug, Clone, PartialEq)]
31017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31019#[cfg_attr(feature = "ts", derive(TS))]
31020#[cfg_attr(feature = "ts", ts(export))]
31021pub struct VICON_POSITION_ESTIMATE_DATA {
31022    #[doc = "Timestamp (UNIX time or time since system boot)"]
31023    pub usec: u64,
31024    #[doc = "Global X position"]
31025    pub x: f32,
31026    #[doc = "Global Y position"]
31027    pub y: f32,
31028    #[doc = "Global Z position"]
31029    pub z: f32,
31030    #[doc = "Roll angle"]
31031    pub roll: f32,
31032    #[doc = "Pitch angle"]
31033    pub pitch: f32,
31034    #[doc = "Yaw angle"]
31035    pub yaw: f32,
31036    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31037    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31038    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31039    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31040    pub covariance: [f32; 21],
31041}
31042impl VICON_POSITION_ESTIMATE_DATA {
31043    pub const ENCODED_LEN: usize = 116usize;
31044    pub const DEFAULT: Self = Self {
31045        usec: 0_u64,
31046        x: 0.0_f32,
31047        y: 0.0_f32,
31048        z: 0.0_f32,
31049        roll: 0.0_f32,
31050        pitch: 0.0_f32,
31051        yaw: 0.0_f32,
31052        covariance: [0.0_f32; 21usize],
31053    };
31054    #[cfg(feature = "arbitrary")]
31055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31056        use arbitrary::{Arbitrary, Unstructured};
31057        let mut buf = [0u8; 1024];
31058        rng.fill_bytes(&mut buf);
31059        let mut unstructured = Unstructured::new(&buf);
31060        Self::arbitrary(&mut unstructured).unwrap_or_default()
31061    }
31062}
31063impl Default for VICON_POSITION_ESTIMATE_DATA {
31064    fn default() -> Self {
31065        Self::DEFAULT.clone()
31066    }
31067}
31068impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31069    type Message = MavMessage;
31070    const ID: u32 = 104u32;
31071    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31072    const EXTRA_CRC: u8 = 56u8;
31073    const ENCODED_LEN: usize = 116usize;
31074    fn deser(
31075        _version: MavlinkVersion,
31076        __input: &[u8],
31077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31078        let avail_len = __input.len();
31079        let mut payload_buf = [0; Self::ENCODED_LEN];
31080        let mut buf = if avail_len < Self::ENCODED_LEN {
31081            payload_buf[0..avail_len].copy_from_slice(__input);
31082            Bytes::new(&payload_buf)
31083        } else {
31084            Bytes::new(__input)
31085        };
31086        let mut __struct = Self::default();
31087        __struct.usec = buf.get_u64_le();
31088        __struct.x = buf.get_f32_le();
31089        __struct.y = buf.get_f32_le();
31090        __struct.z = buf.get_f32_le();
31091        __struct.roll = buf.get_f32_le();
31092        __struct.pitch = buf.get_f32_le();
31093        __struct.yaw = buf.get_f32_le();
31094        for v in &mut __struct.covariance {
31095            let val = buf.get_f32_le();
31096            *v = val;
31097        }
31098        Ok(__struct)
31099    }
31100    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31101        let mut __tmp = BytesMut::new(bytes);
31102        #[allow(clippy::absurd_extreme_comparisons)]
31103        #[allow(unused_comparisons)]
31104        if __tmp.remaining() < Self::ENCODED_LEN {
31105            panic!(
31106                "buffer is too small (need {} bytes, but got {})",
31107                Self::ENCODED_LEN,
31108                __tmp.remaining(),
31109            )
31110        }
31111        __tmp.put_u64_le(self.usec);
31112        __tmp.put_f32_le(self.x);
31113        __tmp.put_f32_le(self.y);
31114        __tmp.put_f32_le(self.z);
31115        __tmp.put_f32_le(self.roll);
31116        __tmp.put_f32_le(self.pitch);
31117        __tmp.put_f32_le(self.yaw);
31118        if matches!(version, MavlinkVersion::V2) {
31119            for val in &self.covariance {
31120                __tmp.put_f32_le(*val);
31121            }
31122            let len = __tmp.len();
31123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31124        } else {
31125            __tmp.len()
31126        }
31127    }
31128}
31129#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31130#[doc = ""]
31131#[doc = "ID: 269"]
31132#[derive(Debug, Clone, PartialEq)]
31133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31135#[cfg_attr(feature = "ts", derive(TS))]
31136#[cfg_attr(feature = "ts", ts(export))]
31137pub struct VIDEO_STREAM_INFORMATION_DATA {
31138    #[doc = "Frame rate."]
31139    pub framerate: f32,
31140    #[doc = "Bit rate."]
31141    pub bitrate: u32,
31142    #[doc = "Bitmap of stream status flags."]
31143    pub flags: VideoStreamStatusFlags,
31144    #[doc = "Horizontal resolution."]
31145    pub resolution_h: u16,
31146    #[doc = "Vertical resolution."]
31147    pub resolution_v: u16,
31148    #[doc = "Video image rotation clockwise."]
31149    pub rotation: u16,
31150    #[doc = "Horizontal Field of view."]
31151    pub hfov: u16,
31152    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31153    pub stream_id: u8,
31154    #[doc = "Number of streams available."]
31155    pub count: u8,
31156    #[doc = "Type of stream."]
31157    pub mavtype: VideoStreamType,
31158    #[doc = "Stream name."]
31159    #[cfg_attr(feature = "ts", ts(type = "string"))]
31160    pub name: CharArray<32>,
31161    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31162    #[cfg_attr(feature = "ts", ts(type = "string"))]
31163    pub uri: CharArray<160>,
31164    #[doc = "Encoding of stream."]
31165    #[cfg_attr(feature = "serde", serde(default))]
31166    pub encoding: VideoStreamEncoding,
31167    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31169    pub camera_device_id: u8,
31170}
31171impl VIDEO_STREAM_INFORMATION_DATA {
31172    pub const ENCODED_LEN: usize = 215usize;
31173    pub const DEFAULT: Self = Self {
31174        framerate: 0.0_f32,
31175        bitrate: 0_u32,
31176        flags: VideoStreamStatusFlags::DEFAULT,
31177        resolution_h: 0_u16,
31178        resolution_v: 0_u16,
31179        rotation: 0_u16,
31180        hfov: 0_u16,
31181        stream_id: 0_u8,
31182        count: 0_u8,
31183        mavtype: VideoStreamType::DEFAULT,
31184        name: CharArray::new([0_u8; 32usize]),
31185        uri: CharArray::new([0_u8; 160usize]),
31186        encoding: VideoStreamEncoding::DEFAULT,
31187        camera_device_id: 0_u8,
31188    };
31189    #[cfg(feature = "arbitrary")]
31190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31191        use arbitrary::{Arbitrary, Unstructured};
31192        let mut buf = [0u8; 1024];
31193        rng.fill_bytes(&mut buf);
31194        let mut unstructured = Unstructured::new(&buf);
31195        Self::arbitrary(&mut unstructured).unwrap_or_default()
31196    }
31197}
31198impl Default for VIDEO_STREAM_INFORMATION_DATA {
31199    fn default() -> Self {
31200        Self::DEFAULT.clone()
31201    }
31202}
31203impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31204    type Message = MavMessage;
31205    const ID: u32 = 269u32;
31206    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31207    const EXTRA_CRC: u8 = 109u8;
31208    const ENCODED_LEN: usize = 215usize;
31209    fn deser(
31210        _version: MavlinkVersion,
31211        __input: &[u8],
31212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31213        let avail_len = __input.len();
31214        let mut payload_buf = [0; Self::ENCODED_LEN];
31215        let mut buf = if avail_len < Self::ENCODED_LEN {
31216            payload_buf[0..avail_len].copy_from_slice(__input);
31217            Bytes::new(&payload_buf)
31218        } else {
31219            Bytes::new(__input)
31220        };
31221        let mut __struct = Self::default();
31222        __struct.framerate = buf.get_f32_le();
31223        __struct.bitrate = buf.get_u32_le();
31224        let tmp = buf.get_u16_le();
31225        __struct.flags = VideoStreamStatusFlags::from_bits(
31226            tmp & VideoStreamStatusFlags::all().bits(),
31227        )
31228        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31229            flag_type: "VideoStreamStatusFlags",
31230            value: tmp as u32,
31231        })?;
31232        __struct.resolution_h = buf.get_u16_le();
31233        __struct.resolution_v = buf.get_u16_le();
31234        __struct.rotation = buf.get_u16_le();
31235        __struct.hfov = buf.get_u16_le();
31236        __struct.stream_id = buf.get_u8();
31237        __struct.count = buf.get_u8();
31238        let tmp = buf.get_u8();
31239        __struct.mavtype =
31240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31241                enum_type: "VideoStreamType",
31242                value: tmp as u32,
31243            })?;
31244        let mut tmp = [0_u8; 32usize];
31245        for v in &mut tmp {
31246            *v = buf.get_u8();
31247        }
31248        __struct.name = CharArray::new(tmp);
31249        let mut tmp = [0_u8; 160usize];
31250        for v in &mut tmp {
31251            *v = buf.get_u8();
31252        }
31253        __struct.uri = CharArray::new(tmp);
31254        let tmp = buf.get_u8();
31255        __struct.encoding =
31256            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31257                enum_type: "VideoStreamEncoding",
31258                value: tmp as u32,
31259            })?;
31260        __struct.camera_device_id = buf.get_u8();
31261        Ok(__struct)
31262    }
31263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31264        let mut __tmp = BytesMut::new(bytes);
31265        #[allow(clippy::absurd_extreme_comparisons)]
31266        #[allow(unused_comparisons)]
31267        if __tmp.remaining() < Self::ENCODED_LEN {
31268            panic!(
31269                "buffer is too small (need {} bytes, but got {})",
31270                Self::ENCODED_LEN,
31271                __tmp.remaining(),
31272            )
31273        }
31274        __tmp.put_f32_le(self.framerate);
31275        __tmp.put_u32_le(self.bitrate);
31276        __tmp.put_u16_le(self.flags.bits());
31277        __tmp.put_u16_le(self.resolution_h);
31278        __tmp.put_u16_le(self.resolution_v);
31279        __tmp.put_u16_le(self.rotation);
31280        __tmp.put_u16_le(self.hfov);
31281        __tmp.put_u8(self.stream_id);
31282        __tmp.put_u8(self.count);
31283        __tmp.put_u8(self.mavtype as u8);
31284        for val in &self.name {
31285            __tmp.put_u8(*val);
31286        }
31287        for val in &self.uri {
31288            __tmp.put_u8(*val);
31289        }
31290        if matches!(version, MavlinkVersion::V2) {
31291            __tmp.put_u8(self.encoding as u8);
31292            __tmp.put_u8(self.camera_device_id);
31293            let len = __tmp.len();
31294            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31295        } else {
31296            __tmp.len()
31297        }
31298    }
31299}
31300#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31301#[doc = ""]
31302#[doc = "ID: 270"]
31303#[derive(Debug, Clone, PartialEq)]
31304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31306#[cfg_attr(feature = "ts", derive(TS))]
31307#[cfg_attr(feature = "ts", ts(export))]
31308pub struct VIDEO_STREAM_STATUS_DATA {
31309    #[doc = "Frame rate"]
31310    pub framerate: f32,
31311    #[doc = "Bit rate"]
31312    pub bitrate: u32,
31313    #[doc = "Bitmap of stream status flags"]
31314    pub flags: VideoStreamStatusFlags,
31315    #[doc = "Horizontal resolution"]
31316    pub resolution_h: u16,
31317    #[doc = "Vertical resolution"]
31318    pub resolution_v: u16,
31319    #[doc = "Video image rotation clockwise"]
31320    pub rotation: u16,
31321    #[doc = "Horizontal Field of view"]
31322    pub hfov: u16,
31323    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31324    pub stream_id: u8,
31325    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31327    pub camera_device_id: u8,
31328}
31329impl VIDEO_STREAM_STATUS_DATA {
31330    pub const ENCODED_LEN: usize = 20usize;
31331    pub const DEFAULT: Self = Self {
31332        framerate: 0.0_f32,
31333        bitrate: 0_u32,
31334        flags: VideoStreamStatusFlags::DEFAULT,
31335        resolution_h: 0_u16,
31336        resolution_v: 0_u16,
31337        rotation: 0_u16,
31338        hfov: 0_u16,
31339        stream_id: 0_u8,
31340        camera_device_id: 0_u8,
31341    };
31342    #[cfg(feature = "arbitrary")]
31343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31344        use arbitrary::{Arbitrary, Unstructured};
31345        let mut buf = [0u8; 1024];
31346        rng.fill_bytes(&mut buf);
31347        let mut unstructured = Unstructured::new(&buf);
31348        Self::arbitrary(&mut unstructured).unwrap_or_default()
31349    }
31350}
31351impl Default for VIDEO_STREAM_STATUS_DATA {
31352    fn default() -> Self {
31353        Self::DEFAULT.clone()
31354    }
31355}
31356impl MessageData for VIDEO_STREAM_STATUS_DATA {
31357    type Message = MavMessage;
31358    const ID: u32 = 270u32;
31359    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31360    const EXTRA_CRC: u8 = 59u8;
31361    const ENCODED_LEN: usize = 20usize;
31362    fn deser(
31363        _version: MavlinkVersion,
31364        __input: &[u8],
31365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31366        let avail_len = __input.len();
31367        let mut payload_buf = [0; Self::ENCODED_LEN];
31368        let mut buf = if avail_len < Self::ENCODED_LEN {
31369            payload_buf[0..avail_len].copy_from_slice(__input);
31370            Bytes::new(&payload_buf)
31371        } else {
31372            Bytes::new(__input)
31373        };
31374        let mut __struct = Self::default();
31375        __struct.framerate = buf.get_f32_le();
31376        __struct.bitrate = buf.get_u32_le();
31377        let tmp = buf.get_u16_le();
31378        __struct.flags = VideoStreamStatusFlags::from_bits(
31379            tmp & VideoStreamStatusFlags::all().bits(),
31380        )
31381        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31382            flag_type: "VideoStreamStatusFlags",
31383            value: tmp as u32,
31384        })?;
31385        __struct.resolution_h = buf.get_u16_le();
31386        __struct.resolution_v = buf.get_u16_le();
31387        __struct.rotation = buf.get_u16_le();
31388        __struct.hfov = buf.get_u16_le();
31389        __struct.stream_id = buf.get_u8();
31390        __struct.camera_device_id = buf.get_u8();
31391        Ok(__struct)
31392    }
31393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31394        let mut __tmp = BytesMut::new(bytes);
31395        #[allow(clippy::absurd_extreme_comparisons)]
31396        #[allow(unused_comparisons)]
31397        if __tmp.remaining() < Self::ENCODED_LEN {
31398            panic!(
31399                "buffer is too small (need {} bytes, but got {})",
31400                Self::ENCODED_LEN,
31401                __tmp.remaining(),
31402            )
31403        }
31404        __tmp.put_f32_le(self.framerate);
31405        __tmp.put_u32_le(self.bitrate);
31406        __tmp.put_u16_le(self.flags.bits());
31407        __tmp.put_u16_le(self.resolution_h);
31408        __tmp.put_u16_le(self.resolution_v);
31409        __tmp.put_u16_le(self.rotation);
31410        __tmp.put_u16_le(self.hfov);
31411        __tmp.put_u8(self.stream_id);
31412        if matches!(version, MavlinkVersion::V2) {
31413            __tmp.put_u8(self.camera_device_id);
31414            let len = __tmp.len();
31415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31416        } else {
31417            __tmp.len()
31418        }
31419    }
31420}
31421#[doc = "Local position/attitude estimate from a vision source."]
31422#[doc = ""]
31423#[doc = "ID: 102"]
31424#[derive(Debug, Clone, PartialEq)]
31425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31427#[cfg_attr(feature = "ts", derive(TS))]
31428#[cfg_attr(feature = "ts", ts(export))]
31429pub struct VISION_POSITION_ESTIMATE_DATA {
31430    #[doc = "Timestamp (UNIX time or time since system boot)"]
31431    pub usec: u64,
31432    #[doc = "Local X position"]
31433    pub x: f32,
31434    #[doc = "Local Y position"]
31435    pub y: f32,
31436    #[doc = "Local Z position"]
31437    pub z: f32,
31438    #[doc = "Roll angle"]
31439    pub roll: f32,
31440    #[doc = "Pitch angle"]
31441    pub pitch: f32,
31442    #[doc = "Yaw angle"]
31443    pub yaw: f32,
31444    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31445    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31447    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31448    pub covariance: [f32; 21],
31449    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31450    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31451    pub reset_counter: u8,
31452}
31453impl VISION_POSITION_ESTIMATE_DATA {
31454    pub const ENCODED_LEN: usize = 117usize;
31455    pub const DEFAULT: Self = Self {
31456        usec: 0_u64,
31457        x: 0.0_f32,
31458        y: 0.0_f32,
31459        z: 0.0_f32,
31460        roll: 0.0_f32,
31461        pitch: 0.0_f32,
31462        yaw: 0.0_f32,
31463        covariance: [0.0_f32; 21usize],
31464        reset_counter: 0_u8,
31465    };
31466    #[cfg(feature = "arbitrary")]
31467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31468        use arbitrary::{Arbitrary, Unstructured};
31469        let mut buf = [0u8; 1024];
31470        rng.fill_bytes(&mut buf);
31471        let mut unstructured = Unstructured::new(&buf);
31472        Self::arbitrary(&mut unstructured).unwrap_or_default()
31473    }
31474}
31475impl Default for VISION_POSITION_ESTIMATE_DATA {
31476    fn default() -> Self {
31477        Self::DEFAULT.clone()
31478    }
31479}
31480impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31481    type Message = MavMessage;
31482    const ID: u32 = 102u32;
31483    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31484    const EXTRA_CRC: u8 = 158u8;
31485    const ENCODED_LEN: usize = 117usize;
31486    fn deser(
31487        _version: MavlinkVersion,
31488        __input: &[u8],
31489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31490        let avail_len = __input.len();
31491        let mut payload_buf = [0; Self::ENCODED_LEN];
31492        let mut buf = if avail_len < Self::ENCODED_LEN {
31493            payload_buf[0..avail_len].copy_from_slice(__input);
31494            Bytes::new(&payload_buf)
31495        } else {
31496            Bytes::new(__input)
31497        };
31498        let mut __struct = Self::default();
31499        __struct.usec = buf.get_u64_le();
31500        __struct.x = buf.get_f32_le();
31501        __struct.y = buf.get_f32_le();
31502        __struct.z = buf.get_f32_le();
31503        __struct.roll = buf.get_f32_le();
31504        __struct.pitch = buf.get_f32_le();
31505        __struct.yaw = buf.get_f32_le();
31506        for v in &mut __struct.covariance {
31507            let val = buf.get_f32_le();
31508            *v = val;
31509        }
31510        __struct.reset_counter = buf.get_u8();
31511        Ok(__struct)
31512    }
31513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31514        let mut __tmp = BytesMut::new(bytes);
31515        #[allow(clippy::absurd_extreme_comparisons)]
31516        #[allow(unused_comparisons)]
31517        if __tmp.remaining() < Self::ENCODED_LEN {
31518            panic!(
31519                "buffer is too small (need {} bytes, but got {})",
31520                Self::ENCODED_LEN,
31521                __tmp.remaining(),
31522            )
31523        }
31524        __tmp.put_u64_le(self.usec);
31525        __tmp.put_f32_le(self.x);
31526        __tmp.put_f32_le(self.y);
31527        __tmp.put_f32_le(self.z);
31528        __tmp.put_f32_le(self.roll);
31529        __tmp.put_f32_le(self.pitch);
31530        __tmp.put_f32_le(self.yaw);
31531        if matches!(version, MavlinkVersion::V2) {
31532            for val in &self.covariance {
31533                __tmp.put_f32_le(*val);
31534            }
31535            __tmp.put_u8(self.reset_counter);
31536            let len = __tmp.len();
31537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31538        } else {
31539            __tmp.len()
31540        }
31541    }
31542}
31543#[doc = "Speed estimate from a vision source."]
31544#[doc = ""]
31545#[doc = "ID: 103"]
31546#[derive(Debug, Clone, PartialEq)]
31547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31549#[cfg_attr(feature = "ts", derive(TS))]
31550#[cfg_attr(feature = "ts", ts(export))]
31551pub struct VISION_SPEED_ESTIMATE_DATA {
31552    #[doc = "Timestamp (UNIX time or time since system boot)"]
31553    pub usec: u64,
31554    #[doc = "Global X speed"]
31555    pub x: f32,
31556    #[doc = "Global Y speed"]
31557    pub y: f32,
31558    #[doc = "Global Z speed"]
31559    pub z: f32,
31560    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31561    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31563    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31564    pub covariance: [f32; 9],
31565    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31566    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31567    pub reset_counter: u8,
31568}
31569impl VISION_SPEED_ESTIMATE_DATA {
31570    pub const ENCODED_LEN: usize = 57usize;
31571    pub const DEFAULT: Self = Self {
31572        usec: 0_u64,
31573        x: 0.0_f32,
31574        y: 0.0_f32,
31575        z: 0.0_f32,
31576        covariance: [0.0_f32; 9usize],
31577        reset_counter: 0_u8,
31578    };
31579    #[cfg(feature = "arbitrary")]
31580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31581        use arbitrary::{Arbitrary, Unstructured};
31582        let mut buf = [0u8; 1024];
31583        rng.fill_bytes(&mut buf);
31584        let mut unstructured = Unstructured::new(&buf);
31585        Self::arbitrary(&mut unstructured).unwrap_or_default()
31586    }
31587}
31588impl Default for VISION_SPEED_ESTIMATE_DATA {
31589    fn default() -> Self {
31590        Self::DEFAULT.clone()
31591    }
31592}
31593impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31594    type Message = MavMessage;
31595    const ID: u32 = 103u32;
31596    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31597    const EXTRA_CRC: u8 = 208u8;
31598    const ENCODED_LEN: usize = 57usize;
31599    fn deser(
31600        _version: MavlinkVersion,
31601        __input: &[u8],
31602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31603        let avail_len = __input.len();
31604        let mut payload_buf = [0; Self::ENCODED_LEN];
31605        let mut buf = if avail_len < Self::ENCODED_LEN {
31606            payload_buf[0..avail_len].copy_from_slice(__input);
31607            Bytes::new(&payload_buf)
31608        } else {
31609            Bytes::new(__input)
31610        };
31611        let mut __struct = Self::default();
31612        __struct.usec = buf.get_u64_le();
31613        __struct.x = buf.get_f32_le();
31614        __struct.y = buf.get_f32_le();
31615        __struct.z = buf.get_f32_le();
31616        for v in &mut __struct.covariance {
31617            let val = buf.get_f32_le();
31618            *v = val;
31619        }
31620        __struct.reset_counter = buf.get_u8();
31621        Ok(__struct)
31622    }
31623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31624        let mut __tmp = BytesMut::new(bytes);
31625        #[allow(clippy::absurd_extreme_comparisons)]
31626        #[allow(unused_comparisons)]
31627        if __tmp.remaining() < Self::ENCODED_LEN {
31628            panic!(
31629                "buffer is too small (need {} bytes, but got {})",
31630                Self::ENCODED_LEN,
31631                __tmp.remaining(),
31632            )
31633        }
31634        __tmp.put_u64_le(self.usec);
31635        __tmp.put_f32_le(self.x);
31636        __tmp.put_f32_le(self.y);
31637        __tmp.put_f32_le(self.z);
31638        if matches!(version, MavlinkVersion::V2) {
31639            for val in &self.covariance {
31640                __tmp.put_f32_le(*val);
31641            }
31642            __tmp.put_u8(self.reset_counter);
31643            let len = __tmp.len();
31644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31645        } else {
31646            __tmp.len()
31647        }
31648    }
31649}
31650#[doc = "Cumulative distance traveled for each reported wheel."]
31651#[doc = ""]
31652#[doc = "ID: 9000"]
31653#[derive(Debug, Clone, PartialEq)]
31654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31656#[cfg_attr(feature = "ts", derive(TS))]
31657#[cfg_attr(feature = "ts", ts(export))]
31658pub struct WHEEL_DISTANCE_DATA {
31659    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31660    pub time_usec: u64,
31661    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
31662    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31663    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31664    pub distance: [f64; 16],
31665    #[doc = "Number of wheels reported."]
31666    pub count: u8,
31667}
31668impl WHEEL_DISTANCE_DATA {
31669    pub const ENCODED_LEN: usize = 137usize;
31670    pub const DEFAULT: Self = Self {
31671        time_usec: 0_u64,
31672        distance: [0.0_f64; 16usize],
31673        count: 0_u8,
31674    };
31675    #[cfg(feature = "arbitrary")]
31676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31677        use arbitrary::{Arbitrary, Unstructured};
31678        let mut buf = [0u8; 1024];
31679        rng.fill_bytes(&mut buf);
31680        let mut unstructured = Unstructured::new(&buf);
31681        Self::arbitrary(&mut unstructured).unwrap_or_default()
31682    }
31683}
31684impl Default for WHEEL_DISTANCE_DATA {
31685    fn default() -> Self {
31686        Self::DEFAULT.clone()
31687    }
31688}
31689impl MessageData for WHEEL_DISTANCE_DATA {
31690    type Message = MavMessage;
31691    const ID: u32 = 9000u32;
31692    const NAME: &'static str = "WHEEL_DISTANCE";
31693    const EXTRA_CRC: u8 = 113u8;
31694    const ENCODED_LEN: usize = 137usize;
31695    fn deser(
31696        _version: MavlinkVersion,
31697        __input: &[u8],
31698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31699        let avail_len = __input.len();
31700        let mut payload_buf = [0; Self::ENCODED_LEN];
31701        let mut buf = if avail_len < Self::ENCODED_LEN {
31702            payload_buf[0..avail_len].copy_from_slice(__input);
31703            Bytes::new(&payload_buf)
31704        } else {
31705            Bytes::new(__input)
31706        };
31707        let mut __struct = Self::default();
31708        __struct.time_usec = buf.get_u64_le();
31709        for v in &mut __struct.distance {
31710            let val = buf.get_f64_le();
31711            *v = val;
31712        }
31713        __struct.count = buf.get_u8();
31714        Ok(__struct)
31715    }
31716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31717        let mut __tmp = BytesMut::new(bytes);
31718        #[allow(clippy::absurd_extreme_comparisons)]
31719        #[allow(unused_comparisons)]
31720        if __tmp.remaining() < Self::ENCODED_LEN {
31721            panic!(
31722                "buffer is too small (need {} bytes, but got {})",
31723                Self::ENCODED_LEN,
31724                __tmp.remaining(),
31725            )
31726        }
31727        __tmp.put_u64_le(self.time_usec);
31728        for val in &self.distance {
31729            __tmp.put_f64_le(*val);
31730        }
31731        __tmp.put_u8(self.count);
31732        if matches!(version, MavlinkVersion::V2) {
31733            let len = __tmp.len();
31734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31735        } else {
31736            __tmp.len()
31737        }
31738    }
31739}
31740#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31741#[doc = ""]
31742#[doc = "ID: 299"]
31743#[derive(Debug, Clone, PartialEq)]
31744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31746#[cfg_attr(feature = "ts", derive(TS))]
31747#[cfg_attr(feature = "ts", ts(export))]
31748pub struct WIFI_CONFIG_AP_DATA {
31749    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31750    #[cfg_attr(feature = "ts", ts(type = "string"))]
31751    pub ssid: CharArray<32>,
31752    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31753    #[cfg_attr(feature = "ts", ts(type = "string"))]
31754    pub password: CharArray<64>,
31755    #[doc = "WiFi Mode."]
31756    #[cfg_attr(feature = "serde", serde(default))]
31757    pub mode: WifiConfigApMode,
31758    #[doc = "Message acceptance response (sent back to GS)."]
31759    #[cfg_attr(feature = "serde", serde(default))]
31760    pub response: WifiConfigApResponse,
31761}
31762impl WIFI_CONFIG_AP_DATA {
31763    pub const ENCODED_LEN: usize = 98usize;
31764    pub const DEFAULT: Self = Self {
31765        ssid: CharArray::new([0_u8; 32usize]),
31766        password: CharArray::new([0_u8; 64usize]),
31767        mode: WifiConfigApMode::DEFAULT,
31768        response: WifiConfigApResponse::DEFAULT,
31769    };
31770    #[cfg(feature = "arbitrary")]
31771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31772        use arbitrary::{Arbitrary, Unstructured};
31773        let mut buf = [0u8; 1024];
31774        rng.fill_bytes(&mut buf);
31775        let mut unstructured = Unstructured::new(&buf);
31776        Self::arbitrary(&mut unstructured).unwrap_or_default()
31777    }
31778}
31779impl Default for WIFI_CONFIG_AP_DATA {
31780    fn default() -> Self {
31781        Self::DEFAULT.clone()
31782    }
31783}
31784impl MessageData for WIFI_CONFIG_AP_DATA {
31785    type Message = MavMessage;
31786    const ID: u32 = 299u32;
31787    const NAME: &'static str = "WIFI_CONFIG_AP";
31788    const EXTRA_CRC: u8 = 19u8;
31789    const ENCODED_LEN: usize = 98usize;
31790    fn deser(
31791        _version: MavlinkVersion,
31792        __input: &[u8],
31793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31794        let avail_len = __input.len();
31795        let mut payload_buf = [0; Self::ENCODED_LEN];
31796        let mut buf = if avail_len < Self::ENCODED_LEN {
31797            payload_buf[0..avail_len].copy_from_slice(__input);
31798            Bytes::new(&payload_buf)
31799        } else {
31800            Bytes::new(__input)
31801        };
31802        let mut __struct = Self::default();
31803        let mut tmp = [0_u8; 32usize];
31804        for v in &mut tmp {
31805            *v = buf.get_u8();
31806        }
31807        __struct.ssid = CharArray::new(tmp);
31808        let mut tmp = [0_u8; 64usize];
31809        for v in &mut tmp {
31810            *v = buf.get_u8();
31811        }
31812        __struct.password = CharArray::new(tmp);
31813        let tmp = buf.get_i8();
31814        __struct.mode =
31815            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31816                enum_type: "WifiConfigApMode",
31817                value: tmp as u32,
31818            })?;
31819        let tmp = buf.get_i8();
31820        __struct.response =
31821            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31822                enum_type: "WifiConfigApResponse",
31823                value: tmp as u32,
31824            })?;
31825        Ok(__struct)
31826    }
31827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31828        let mut __tmp = BytesMut::new(bytes);
31829        #[allow(clippy::absurd_extreme_comparisons)]
31830        #[allow(unused_comparisons)]
31831        if __tmp.remaining() < Self::ENCODED_LEN {
31832            panic!(
31833                "buffer is too small (need {} bytes, but got {})",
31834                Self::ENCODED_LEN,
31835                __tmp.remaining(),
31836            )
31837        }
31838        for val in &self.ssid {
31839            __tmp.put_u8(*val);
31840        }
31841        for val in &self.password {
31842            __tmp.put_u8(*val);
31843        }
31844        if matches!(version, MavlinkVersion::V2) {
31845            __tmp.put_i8(self.mode as i8);
31846            __tmp.put_i8(self.response as i8);
31847            let len = __tmp.len();
31848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31849        } else {
31850            __tmp.len()
31851        }
31852    }
31853}
31854#[doc = "Winch status."]
31855#[doc = ""]
31856#[doc = "ID: 9005"]
31857#[derive(Debug, Clone, PartialEq)]
31858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31860#[cfg_attr(feature = "ts", derive(TS))]
31861#[cfg_attr(feature = "ts", ts(export))]
31862pub struct WINCH_STATUS_DATA {
31863    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31864    pub time_usec: u64,
31865    #[doc = "Length of line released. NaN if unknown"]
31866    pub line_length: f32,
31867    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31868    pub speed: f32,
31869    #[doc = "Tension on the line. NaN if unknown"]
31870    pub tension: f32,
31871    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31872    pub voltage: f32,
31873    #[doc = "Current draw from the winch. NaN if unknown"]
31874    pub current: f32,
31875    #[doc = "Status flags"]
31876    pub status: MavWinchStatusFlag,
31877    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31878    pub temperature: i16,
31879}
31880impl WINCH_STATUS_DATA {
31881    pub const ENCODED_LEN: usize = 34usize;
31882    pub const DEFAULT: Self = Self {
31883        time_usec: 0_u64,
31884        line_length: 0.0_f32,
31885        speed: 0.0_f32,
31886        tension: 0.0_f32,
31887        voltage: 0.0_f32,
31888        current: 0.0_f32,
31889        status: MavWinchStatusFlag::DEFAULT,
31890        temperature: 0_i16,
31891    };
31892    #[cfg(feature = "arbitrary")]
31893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31894        use arbitrary::{Arbitrary, Unstructured};
31895        let mut buf = [0u8; 1024];
31896        rng.fill_bytes(&mut buf);
31897        let mut unstructured = Unstructured::new(&buf);
31898        Self::arbitrary(&mut unstructured).unwrap_or_default()
31899    }
31900}
31901impl Default for WINCH_STATUS_DATA {
31902    fn default() -> Self {
31903        Self::DEFAULT.clone()
31904    }
31905}
31906impl MessageData for WINCH_STATUS_DATA {
31907    type Message = MavMessage;
31908    const ID: u32 = 9005u32;
31909    const NAME: &'static str = "WINCH_STATUS";
31910    const EXTRA_CRC: u8 = 117u8;
31911    const ENCODED_LEN: usize = 34usize;
31912    fn deser(
31913        _version: MavlinkVersion,
31914        __input: &[u8],
31915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31916        let avail_len = __input.len();
31917        let mut payload_buf = [0; Self::ENCODED_LEN];
31918        let mut buf = if avail_len < Self::ENCODED_LEN {
31919            payload_buf[0..avail_len].copy_from_slice(__input);
31920            Bytes::new(&payload_buf)
31921        } else {
31922            Bytes::new(__input)
31923        };
31924        let mut __struct = Self::default();
31925        __struct.time_usec = buf.get_u64_le();
31926        __struct.line_length = buf.get_f32_le();
31927        __struct.speed = buf.get_f32_le();
31928        __struct.tension = buf.get_f32_le();
31929        __struct.voltage = buf.get_f32_le();
31930        __struct.current = buf.get_f32_le();
31931        let tmp = buf.get_u32_le();
31932        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31933            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31934                flag_type: "MavWinchStatusFlag",
31935                value: tmp as u32,
31936            })?;
31937        __struct.temperature = buf.get_i16_le();
31938        Ok(__struct)
31939    }
31940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31941        let mut __tmp = BytesMut::new(bytes);
31942        #[allow(clippy::absurd_extreme_comparisons)]
31943        #[allow(unused_comparisons)]
31944        if __tmp.remaining() < Self::ENCODED_LEN {
31945            panic!(
31946                "buffer is too small (need {} bytes, but got {})",
31947                Self::ENCODED_LEN,
31948                __tmp.remaining(),
31949            )
31950        }
31951        __tmp.put_u64_le(self.time_usec);
31952        __tmp.put_f32_le(self.line_length);
31953        __tmp.put_f32_le(self.speed);
31954        __tmp.put_f32_le(self.tension);
31955        __tmp.put_f32_le(self.voltage);
31956        __tmp.put_f32_le(self.current);
31957        __tmp.put_u32_le(self.status.bits());
31958        __tmp.put_i16_le(self.temperature);
31959        if matches!(version, MavlinkVersion::V2) {
31960            let len = __tmp.len();
31961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31962        } else {
31963            __tmp.len()
31964        }
31965    }
31966}
31967#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31968#[doc = ""]
31969#[doc = "ID: 231"]
31970#[derive(Debug, Clone, PartialEq)]
31971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31973#[cfg_attr(feature = "ts", derive(TS))]
31974#[cfg_attr(feature = "ts", ts(export))]
31975pub struct WIND_COV_DATA {
31976    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31977    pub time_usec: u64,
31978    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31979    pub wind_x: f32,
31980    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31981    pub wind_y: f32,
31982    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31983    pub wind_z: f32,
31984    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31985    pub var_horiz: f32,
31986    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31987    pub var_vert: f32,
31988    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31989    pub wind_alt: f32,
31990    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31991    pub horiz_accuracy: f32,
31992    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31993    pub vert_accuracy: f32,
31994}
31995impl WIND_COV_DATA {
31996    pub const ENCODED_LEN: usize = 40usize;
31997    pub const DEFAULT: Self = Self {
31998        time_usec: 0_u64,
31999        wind_x: 0.0_f32,
32000        wind_y: 0.0_f32,
32001        wind_z: 0.0_f32,
32002        var_horiz: 0.0_f32,
32003        var_vert: 0.0_f32,
32004        wind_alt: 0.0_f32,
32005        horiz_accuracy: 0.0_f32,
32006        vert_accuracy: 0.0_f32,
32007    };
32008    #[cfg(feature = "arbitrary")]
32009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32010        use arbitrary::{Arbitrary, Unstructured};
32011        let mut buf = [0u8; 1024];
32012        rng.fill_bytes(&mut buf);
32013        let mut unstructured = Unstructured::new(&buf);
32014        Self::arbitrary(&mut unstructured).unwrap_or_default()
32015    }
32016}
32017impl Default for WIND_COV_DATA {
32018    fn default() -> Self {
32019        Self::DEFAULT.clone()
32020    }
32021}
32022impl MessageData for WIND_COV_DATA {
32023    type Message = MavMessage;
32024    const ID: u32 = 231u32;
32025    const NAME: &'static str = "WIND_COV";
32026    const EXTRA_CRC: u8 = 105u8;
32027    const ENCODED_LEN: usize = 40usize;
32028    fn deser(
32029        _version: MavlinkVersion,
32030        __input: &[u8],
32031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32032        let avail_len = __input.len();
32033        let mut payload_buf = [0; Self::ENCODED_LEN];
32034        let mut buf = if avail_len < Self::ENCODED_LEN {
32035            payload_buf[0..avail_len].copy_from_slice(__input);
32036            Bytes::new(&payload_buf)
32037        } else {
32038            Bytes::new(__input)
32039        };
32040        let mut __struct = Self::default();
32041        __struct.time_usec = buf.get_u64_le();
32042        __struct.wind_x = buf.get_f32_le();
32043        __struct.wind_y = buf.get_f32_le();
32044        __struct.wind_z = buf.get_f32_le();
32045        __struct.var_horiz = buf.get_f32_le();
32046        __struct.var_vert = buf.get_f32_le();
32047        __struct.wind_alt = buf.get_f32_le();
32048        __struct.horiz_accuracy = buf.get_f32_le();
32049        __struct.vert_accuracy = buf.get_f32_le();
32050        Ok(__struct)
32051    }
32052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32053        let mut __tmp = BytesMut::new(bytes);
32054        #[allow(clippy::absurd_extreme_comparisons)]
32055        #[allow(unused_comparisons)]
32056        if __tmp.remaining() < Self::ENCODED_LEN {
32057            panic!(
32058                "buffer is too small (need {} bytes, but got {})",
32059                Self::ENCODED_LEN,
32060                __tmp.remaining(),
32061            )
32062        }
32063        __tmp.put_u64_le(self.time_usec);
32064        __tmp.put_f32_le(self.wind_x);
32065        __tmp.put_f32_le(self.wind_y);
32066        __tmp.put_f32_le(self.wind_z);
32067        __tmp.put_f32_le(self.var_horiz);
32068        __tmp.put_f32_le(self.var_vert);
32069        __tmp.put_f32_le(self.wind_alt);
32070        __tmp.put_f32_le(self.horiz_accuracy);
32071        __tmp.put_f32_le(self.vert_accuracy);
32072        if matches!(version, MavlinkVersion::V2) {
32073            let len = __tmp.len();
32074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32075        } else {
32076            __tmp.len()
32077        }
32078    }
32079}
32080#[derive(Clone, PartialEq, Debug)]
32081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32082#[cfg_attr(feature = "serde", serde(tag = "type"))]
32083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32084#[cfg_attr(feature = "ts", derive(TS))]
32085#[cfg_attr(feature = "ts", ts(export))]
32086#[repr(u32)]
32087pub enum MavMessage {
32088    #[doc = "Set the vehicle attitude and body angular rates."]
32089    #[doc = ""]
32090    #[doc = "ID: 140"]
32091    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32092    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32093    #[doc = ""]
32094    #[doc = "ID: 375"]
32095    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32096    #[doc = "The location and information of an ADSB vehicle."]
32097    #[doc = ""]
32098    #[doc = "ID: 246"]
32099    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32100    #[doc = "The location and information of an AIS vessel."]
32101    #[doc = ""]
32102    #[doc = "ID: 301"]
32103    AIS_VESSEL(AIS_VESSEL_DATA),
32104    #[doc = "The current system altitude."]
32105    #[doc = ""]
32106    #[doc = "ID: 141"]
32107    ALTITUDE(ALTITUDE_DATA),
32108    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32109    #[doc = ""]
32110    #[doc = "ID: 30"]
32111    ATTITUDE(ATTITUDE_DATA),
32112    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32113    #[doc = ""]
32114    #[doc = "ID: 31"]
32115    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32116    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32117    #[doc = ""]
32118    #[doc = "ID: 61"]
32119    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32120    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32121    #[doc = ""]
32122    #[doc = "ID: 83"]
32123    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32124    #[doc = "Motion capture attitude and position."]
32125    #[doc = ""]
32126    #[doc = "ID: 138"]
32127    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32128    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32129    #[doc = ""]
32130    #[doc = "ID: 7"]
32131    AUTH_KEY(AUTH_KEY_DATA),
32132    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32133    #[doc = ""]
32134    #[doc = "ID: 286"]
32135    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32136    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32137    #[doc = ""]
32138    #[doc = "ID: 148"]
32139    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32140    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32141    #[doc = ""]
32142    #[doc = "ID: 435"]
32143    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32144    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32145    #[doc = ""]
32146    #[doc = "ID: 437"]
32147    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32148    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32149    #[doc = ""]
32150    #[doc = "ID: 372"]
32151    BATTERY_INFO(BATTERY_INFO_DATA),
32152    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32153    #[doc = ""]
32154    #[doc = "ID: 147"]
32155    BATTERY_STATUS(BATTERY_STATUS_DATA),
32156    #[doc = "Report button state change."]
32157    #[doc = ""]
32158    #[doc = "ID: 257"]
32159    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32160    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32161    #[doc = ""]
32162    #[doc = "ID: 262"]
32163    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32164    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32165    #[doc = ""]
32166    #[doc = "ID: 271"]
32167    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32168    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32169    #[doc = ""]
32170    #[doc = "ID: 263"]
32171    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32172    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32173    #[doc = ""]
32174    #[doc = "ID: 259"]
32175    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32176    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32177    #[doc = ""]
32178    #[doc = "ID: 260"]
32179    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32180    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32181    #[doc = ""]
32182    #[doc = "ID: 277"]
32183    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32184    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32185    #[doc = ""]
32186    #[doc = "ID: 276"]
32187    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32188    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32189    #[doc = ""]
32190    #[doc = "ID: 275"]
32191    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32192    #[doc = "Camera-IMU triggering and synchronisation message."]
32193    #[doc = ""]
32194    #[doc = "ID: 112"]
32195    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32196    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32197    #[doc = ""]
32198    #[doc = "ID: 387"]
32199    CANFD_FRAME(CANFD_FRAME_DATA),
32200    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32201    #[doc = ""]
32202    #[doc = "ID: 388"]
32203    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32204    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32205    #[doc = ""]
32206    #[doc = "ID: 386"]
32207    CAN_FRAME(CAN_FRAME_DATA),
32208    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32209    #[doc = ""]
32210    #[doc = "ID: 336"]
32211    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32212    #[doc = "Report current used cellular network status."]
32213    #[doc = ""]
32214    #[doc = "ID: 334"]
32215    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32216    #[doc = "Request to control this MAV."]
32217    #[doc = ""]
32218    #[doc = "ID: 5"]
32219    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32220    #[doc = "Accept / deny control of this MAV."]
32221    #[doc = ""]
32222    #[doc = "ID: 6"]
32223    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32224    #[doc = "Information about a potential collision."]
32225    #[doc = ""]
32226    #[doc = "ID: 247"]
32227    COLLISION(COLLISION_DATA),
32228    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32229    #[doc = ""]
32230    #[doc = "ID: 77"]
32231    COMMAND_ACK(COMMAND_ACK_DATA),
32232    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32233    #[doc = ""]
32234    #[doc = "ID: 80"]
32235    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32236    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32237    #[doc = ""]
32238    #[doc = "ID: 75"]
32239    COMMAND_INT(COMMAND_INT_DATA),
32240    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32241    #[doc = ""]
32242    #[doc = "ID: 76"]
32243    COMMAND_LONG(COMMAND_LONG_DATA),
32244    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32245    #[doc = ""]
32246    #[doc = "ID: 395"]
32247    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32248    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32249    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32250    #[doc = ""]
32251    #[doc = "ID: 396"]
32252    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32253    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32254    #[doc = ""]
32255    #[doc = "ID: 397"]
32256    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32257    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32258    #[doc = ""]
32259    #[doc = "ID: 146"]
32260    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32261    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32262    #[doc = ""]
32263    #[doc = "ID: 411"]
32264    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32265    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32266    #[doc = ""]
32267    #[doc = "ID: 436"]
32268    CURRENT_MODE(CURRENT_MODE_DATA),
32269    #[doc = "Data stream status information."]
32270    #[doc = ""]
32271    #[doc = "ID: 67"]
32272    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32273    DATA_STREAM(DATA_STREAM_DATA),
32274    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32275    #[doc = ""]
32276    #[doc = "ID: 130"]
32277    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32278    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32279    #[doc = ""]
32280    #[doc = "ID: 254"]
32281    DEBUG(DEBUG_DATA),
32282    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32283    #[doc = ""]
32284    #[doc = "ID: 350"]
32285    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32286    #[doc = "To debug something using a named 3D vector."]
32287    #[doc = ""]
32288    #[doc = "ID: 250"]
32289    DEBUG_VECT(DEBUG_VECT_DATA),
32290    #[doc = "Distance sensor information for an onboard rangefinder."]
32291    #[doc = ""]
32292    #[doc = "ID: 132"]
32293    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32294    #[doc = "EFI status output."]
32295    #[doc = ""]
32296    #[doc = "ID: 225"]
32297    EFI_STATUS(EFI_STATUS_DATA),
32298    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32299    #[doc = ""]
32300    #[doc = "ID: 131"]
32301    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32302    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32303    #[doc = ""]
32304    #[doc = "ID: 290"]
32305    ESC_INFO(ESC_INFO_DATA),
32306    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32307    #[doc = ""]
32308    #[doc = "ID: 291"]
32309    ESC_STATUS(ESC_STATUS_DATA),
32310    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32311    #[doc = ""]
32312    #[doc = "ID: 230"]
32313    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32314    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32315    #[doc = ""]
32316    #[doc = "ID: 410"]
32317    EVENT(EVENT_DATA),
32318    #[doc = "Provides state for additional features."]
32319    #[doc = ""]
32320    #[doc = "ID: 245"]
32321    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32322    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32323    #[doc = ""]
32324    #[doc = "ID: 162"]
32325    FENCE_STATUS(FENCE_STATUS_DATA),
32326    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32327    #[doc = ""]
32328    #[doc = "ID: 110"]
32329    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32330    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32331    #[doc = ""]
32332    #[doc = "ID: 264"]
32333    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32334    #[doc = "Current motion information from a designated system."]
32335    #[doc = ""]
32336    #[doc = "ID: 144"]
32337    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32338    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32339    #[doc = ""]
32340    #[doc = "ID: 371"]
32341    FUEL_STATUS(FUEL_STATUS_DATA),
32342    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32343    #[doc = ""]
32344    #[doc = "ID: 373"]
32345    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32346    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32347    #[doc = ""]
32348    #[doc = "ID: 285"]
32349    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32350    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32351    #[doc = ""]
32352    #[doc = "ID: 283"]
32353    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32354    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32355    #[doc = ""]
32356    #[doc = "ID: 284"]
32357    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32358    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32359    #[doc = ""]
32360    #[doc = "ID: 280"]
32361    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32362    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32363    #[doc = ""]
32364    #[doc = "ID: 282"]
32365    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32366    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32367    #[doc = ""]
32368    #[doc = "ID: 288"]
32369    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32370    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32371    #[doc = ""]
32372    #[doc = "ID: 287"]
32373    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32374    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32375    #[doc = ""]
32376    #[doc = "ID: 281"]
32377    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32378    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32379    #[doc = ""]
32380    #[doc = "ID: 33"]
32381    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32382    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32383    #[doc = ""]
32384    #[doc = "ID: 63"]
32385    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32386    #[doc = "Global position/attitude estimate from a vision source."]
32387    #[doc = ""]
32388    #[doc = "ID: 101"]
32389    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32390    #[doc = "Second GPS data."]
32391    #[doc = ""]
32392    #[doc = "ID: 124"]
32393    GPS2_RAW(GPS2_RAW_DATA),
32394    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32395    #[doc = ""]
32396    #[doc = "ID: 128"]
32397    GPS2_RTK(GPS2_RTK_DATA),
32398    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32399    #[doc = ""]
32400    #[doc = "ID: 49"]
32401    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32402    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32403    #[doc = ""]
32404    #[doc = "ID: 123"]
32405    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32406    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32407    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32408    #[doc = ""]
32409    #[doc = "ID: 232"]
32410    GPS_INPUT(GPS_INPUT_DATA),
32411    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32412    #[doc = ""]
32413    #[doc = "ID: 24"]
32414    GPS_RAW_INT(GPS_RAW_INT_DATA),
32415    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32416    #[doc = ""]
32417    #[doc = "ID: 233"]
32418    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32419    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32420    #[doc = ""]
32421    #[doc = "ID: 127"]
32422    GPS_RTK(GPS_RTK_DATA),
32423    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32424    #[doc = ""]
32425    #[doc = "ID: 25"]
32426    GPS_STATUS(GPS_STATUS_DATA),
32427    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32428    #[doc = ""]
32429    #[doc = "ID: 0"]
32430    HEARTBEAT(HEARTBEAT_DATA),
32431    #[doc = "The IMU readings in SI units in NED body frame."]
32432    #[doc = ""]
32433    #[doc = "ID: 105"]
32434    HIGHRES_IMU(HIGHRES_IMU_DATA),
32435    #[doc = "Message appropriate for high latency connections like Iridium."]
32436    #[doc = ""]
32437    #[doc = "ID: 234"]
32438    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32439    HIGH_LATENCY(HIGH_LATENCY_DATA),
32440    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32441    #[doc = ""]
32442    #[doc = "ID: 235"]
32443    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32444    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32445    #[doc = ""]
32446    #[doc = "ID: 93"]
32447    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32448    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32449    #[doc = ""]
32450    #[doc = "ID: 91"]
32451    HIL_CONTROLS(HIL_CONTROLS_DATA),
32452    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32453    #[doc = ""]
32454    #[doc = "ID: 113"]
32455    HIL_GPS(HIL_GPS_DATA),
32456    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32457    #[doc = ""]
32458    #[doc = "ID: 114"]
32459    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32460    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32461    #[doc = ""]
32462    #[doc = "ID: 92"]
32463    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32464    #[doc = "The IMU readings in SI units in NED body frame."]
32465    #[doc = ""]
32466    #[doc = "ID: 107"]
32467    HIL_SENSOR(HIL_SENSOR_DATA),
32468    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32469    #[doc = ""]
32470    #[doc = "ID: 90"]
32471    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32472    HIL_STATE(HIL_STATE_DATA),
32473    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32474    #[doc = ""]
32475    #[doc = "ID: 115"]
32476    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32477    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32478    #[doc = ""]
32479    #[doc = "ID: 242"]
32480    HOME_POSITION(HOME_POSITION_DATA),
32481    #[doc = "Temperature and humidity from hygrometer."]
32482    #[doc = ""]
32483    #[doc = "ID: 12920"]
32484    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32485    #[doc = "Illuminator status."]
32486    #[doc = ""]
32487    #[doc = "ID: 440"]
32488    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32489    #[doc = "Status of the Iridium SBD link."]
32490    #[doc = ""]
32491    #[doc = "ID: 335"]
32492    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32493    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32494    #[doc = ""]
32495    #[doc = "ID: 149"]
32496    LANDING_TARGET(LANDING_TARGET_DATA),
32497    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32498    #[doc = ""]
32499    #[doc = "ID: 8"]
32500    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32501    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32502    #[doc = ""]
32503    #[doc = "ID: 32"]
32504    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32505    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32506    #[doc = ""]
32507    #[doc = "ID: 64"]
32508    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32509    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32510    #[doc = ""]
32511    #[doc = "ID: 89"]
32512    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32513    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32514    #[doc = ""]
32515    #[doc = "ID: 268"]
32516    LOGGING_ACK(LOGGING_ACK_DATA),
32517    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32518    #[doc = ""]
32519    #[doc = "ID: 266"]
32520    LOGGING_DATA(LOGGING_DATA_DATA),
32521    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32522    #[doc = ""]
32523    #[doc = "ID: 267"]
32524    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32525    #[doc = "Reply to LOG_REQUEST_DATA."]
32526    #[doc = ""]
32527    #[doc = "ID: 120"]
32528    LOG_DATA(LOG_DATA_DATA),
32529    #[doc = "Reply to LOG_REQUEST_LIST."]
32530    #[doc = ""]
32531    #[doc = "ID: 118"]
32532    LOG_ENTRY(LOG_ENTRY_DATA),
32533    #[doc = "Erase all logs."]
32534    #[doc = ""]
32535    #[doc = "ID: 121"]
32536    LOG_ERASE(LOG_ERASE_DATA),
32537    #[doc = "Request a chunk of a log."]
32538    #[doc = ""]
32539    #[doc = "ID: 119"]
32540    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32541    #[doc = "Stop log transfer and resume normal logging."]
32542    #[doc = ""]
32543    #[doc = "ID: 122"]
32544    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32545    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32546    #[doc = ""]
32547    #[doc = "ID: 117"]
32548    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32549    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32550    #[doc = ""]
32551    #[doc = "ID: 192"]
32552    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32553    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32554    #[doc = ""]
32555    #[doc = "ID: 69"]
32556    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32557    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32558    #[doc = ""]
32559    #[doc = "ID: 81"]
32560    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32561    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32562    #[doc = ""]
32563    #[doc = "ID: 249"]
32564    MEMORY_VECT(MEMORY_VECT_DATA),
32565    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32566    #[doc = ""]
32567    #[doc = "ID: 244"]
32568    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32569    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32570    #[doc = ""]
32571    #[doc = "ID: 47"]
32572    MISSION_ACK(MISSION_ACK_DATA),
32573    #[doc = "Delete all mission items at once."]
32574    #[doc = ""]
32575    #[doc = "ID: 45"]
32576    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32577    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32578    #[doc = ""]
32579    #[doc = "ID: 44"]
32580    MISSION_COUNT(MISSION_COUNT_DATA),
32581    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32582    #[doc = ""]
32583    #[doc = "ID: 42"]
32584    MISSION_CURRENT(MISSION_CURRENT_DATA),
32585    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32586    #[doc = ""]
32587    #[doc = "ID: 39"]
32588    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32589    MISSION_ITEM(MISSION_ITEM_DATA),
32590    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32591    #[doc = ""]
32592    #[doc = "ID: 73"]
32593    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32594    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
32595    #[doc = ""]
32596    #[doc = "ID: 46"]
32597    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
32598    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
32599    #[doc = ""]
32600    #[doc = "ID: 40"]
32601    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
32602    MISSION_REQUEST(MISSION_REQUEST_DATA),
32603    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
32604    #[doc = ""]
32605    #[doc = "ID: 51"]
32606    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
32607    #[doc = "Request the overall list of mission items from the system/component."]
32608    #[doc = ""]
32609    #[doc = "ID: 43"]
32610    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
32611    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
32612    #[doc = ""]
32613    #[doc = "ID: 37"]
32614    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
32615    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
32616    #[doc = ""]
32617    #[doc = "ID: 41"]
32618    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
32619    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
32620    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
32621    #[doc = ""]
32622    #[doc = "ID: 38"]
32623    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
32624    #[doc = "Orientation of a mount."]
32625    #[doc = ""]
32626    #[doc = "ID: 265"]
32627    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
32628    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
32629    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32630    #[doc = ""]
32631    #[doc = "ID: 251"]
32632    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
32633    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32634    #[doc = ""]
32635    #[doc = "ID: 252"]
32636    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
32637    #[doc = "The state of the navigation and position controller."]
32638    #[doc = ""]
32639    #[doc = "ID: 62"]
32640    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
32641    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
32642    #[doc = ""]
32643    #[doc = "ID: 330"]
32644    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
32645    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
32646    #[doc = ""]
32647    #[doc = "ID: 331"]
32648    ODOMETRY(ODOMETRY_DATA),
32649    #[doc = "Hardware status sent by an onboard computer."]
32650    #[doc = ""]
32651    #[doc = "ID: 390"]
32652    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
32653    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
32654    #[doc = ""]
32655    #[doc = "ID: 12918"]
32656    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
32657    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
32658    #[doc = ""]
32659    #[doc = "ID: 12902"]
32660    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
32661    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
32662    #[doc = ""]
32663    #[doc = "ID: 12900"]
32664    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
32665    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
32666    #[doc = ""]
32667    #[doc = "ID: 12901"]
32668    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
32669    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
32670    #[doc = ""]
32671    #[doc = "ID: 12915"]
32672    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
32673    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
32674    #[doc = ""]
32675    #[doc = "ID: 12905"]
32676    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
32677    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
32678    #[doc = ""]
32679    #[doc = "ID: 12903"]
32680    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
32681    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
32682    #[doc = ""]
32683    #[doc = "ID: 12904"]
32684    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
32685    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
32686    #[doc = ""]
32687    #[doc = "ID: 12919"]
32688    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
32689    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
32690    #[doc = ""]
32691    #[doc = "ID: 100"]
32692    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
32693    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
32694    #[doc = ""]
32695    #[doc = "ID: 106"]
32696    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
32697    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
32698    #[doc = ""]
32699    #[doc = "ID: 360"]
32700    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
32701    #[doc = "Response from a PARAM_EXT_SET message."]
32702    #[doc = ""]
32703    #[doc = "ID: 324"]
32704    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
32705    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
32706    #[doc = ""]
32707    #[doc = "ID: 321"]
32708    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
32709    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
32710    #[doc = ""]
32711    #[doc = "ID: 320"]
32712    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
32713    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
32714    #[doc = ""]
32715    #[doc = "ID: 323"]
32716    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
32717    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
32718    #[doc = ""]
32719    #[doc = "ID: 322"]
32720    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
32721    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
32722    #[doc = ""]
32723    #[doc = "ID: 50"]
32724    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
32725    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32726    #[doc = ""]
32727    #[doc = "ID: 21"]
32728    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
32729    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
32730    #[doc = ""]
32731    #[doc = "ID: 20"]
32732    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
32733    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32734    #[doc = ""]
32735    #[doc = "ID: 23"]
32736    PARAM_SET(PARAM_SET_DATA),
32737    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
32738    #[doc = ""]
32739    #[doc = "ID: 22"]
32740    PARAM_VALUE(PARAM_VALUE_DATA),
32741    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
32742    #[doc = ""]
32743    #[doc = "ID: 4"]
32744    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
32745    PING(PING_DATA),
32746    #[doc = "Control vehicle tone generation (buzzer)."]
32747    #[doc = ""]
32748    #[doc = "ID: 258"]
32749    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
32750    PLAY_TUNE(PLAY_TUNE_DATA),
32751    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
32752    #[doc = ""]
32753    #[doc = "ID: 400"]
32754    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
32755    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
32756    #[doc = ""]
32757    #[doc = "ID: 87"]
32758    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
32759    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
32760    #[doc = ""]
32761    #[doc = "ID: 85"]
32762    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
32763    #[doc = "Power supply status."]
32764    #[doc = ""]
32765    #[doc = "ID: 125"]
32766    POWER_STATUS(POWER_STATUS_DATA),
32767    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
32768    #[doc = ""]
32769    #[doc = "ID: 300"]
32770    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
32771    #[doc = "Status generated by radio and injected into MAVLink stream."]
32772    #[doc = ""]
32773    #[doc = "ID: 109"]
32774    RADIO_STATUS(RADIO_STATUS_DATA),
32775    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
32776    #[doc = ""]
32777    #[doc = "ID: 27"]
32778    RAW_IMU(RAW_IMU_DATA),
32779    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
32780    #[doc = ""]
32781    #[doc = "ID: 28"]
32782    RAW_PRESSURE(RAW_PRESSURE_DATA),
32783    #[doc = "RPM sensor data message."]
32784    #[doc = ""]
32785    #[doc = "ID: 339"]
32786    RAW_RPM(RAW_RPM_DATA),
32787    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
32788    #[doc = ""]
32789    #[doc = "ID: 65"]
32790    RC_CHANNELS(RC_CHANNELS_DATA),
32791    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
32792    #[doc = ""]
32793    #[doc = "ID: 70"]
32794    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
32795    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
32796    #[doc = ""]
32797    #[doc = "ID: 35"]
32798    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
32799    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
32800    #[doc = ""]
32801    #[doc = "ID: 34"]
32802    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
32803    #[doc = "Request a data stream."]
32804    #[doc = ""]
32805    #[doc = "ID: 66"]
32806    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
32807    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
32808    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
32809    #[doc = ""]
32810    #[doc = "ID: 412"]
32811    REQUEST_EVENT(REQUEST_EVENT_DATA),
32812    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
32813    #[doc = ""]
32814    #[doc = "ID: 142"]
32815    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
32816    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
32817    #[doc = ""]
32818    #[doc = "ID: 413"]
32819    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
32820    #[doc = "Read out the safety zone the MAV currently assumes."]
32821    #[doc = ""]
32822    #[doc = "ID: 55"]
32823    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
32824    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
32825    #[doc = ""]
32826    #[doc = "ID: 54"]
32827    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
32828    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
32829    #[doc = ""]
32830    #[doc = "ID: 26"]
32831    SCALED_IMU(SCALED_IMU_DATA),
32832    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
32833    #[doc = ""]
32834    #[doc = "ID: 116"]
32835    SCALED_IMU2(SCALED_IMU2_DATA),
32836    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
32837    #[doc = ""]
32838    #[doc = "ID: 129"]
32839    SCALED_IMU3(SCALED_IMU3_DATA),
32840    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
32841    #[doc = ""]
32842    #[doc = "ID: 29"]
32843    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
32844    #[doc = "Barometer readings for 2nd barometer."]
32845    #[doc = ""]
32846    #[doc = "ID: 137"]
32847    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
32848    #[doc = "Barometer readings for 3rd barometer."]
32849    #[doc = ""]
32850    #[doc = "ID: 143"]
32851    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
32852    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
32853    #[doc = ""]
32854    #[doc = "ID: 126"]
32855    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
32856    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
32857    #[doc = ""]
32858    #[doc = "ID: 36"]
32859    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
32860    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
32861    #[doc = ""]
32862    #[doc = "ID: 256"]
32863    SETUP_SIGNING(SETUP_SIGNING_DATA),
32864    #[doc = "Set the vehicle attitude and body angular rates."]
32865    #[doc = ""]
32866    #[doc = "ID: 139"]
32867    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
32868    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
32869    #[doc = ""]
32870    #[doc = "ID: 82"]
32871    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
32872    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
32873    #[doc = ""]
32874    #[doc = "ID: 48"]
32875    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
32876    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
32877    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
32878    #[doc = ""]
32879    #[doc = "ID: 243"]
32880    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
32881    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
32882    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
32883    #[doc = ""]
32884    #[doc = "ID: 11"]
32885    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
32886    SET_MODE(SET_MODE_DATA),
32887    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
32888    #[doc = ""]
32889    #[doc = "ID: 86"]
32890    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
32891    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
32892    #[doc = ""]
32893    #[doc = "ID: 84"]
32894    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
32895    #[doc = "Status of simulation environment, if used."]
32896    #[doc = ""]
32897    #[doc = "ID: 108"]
32898    SIM_STATE(SIM_STATE_DATA),
32899    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
32900    #[doc = ""]
32901    #[doc = "ID: 370"]
32902    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
32903    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
32904    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
32905    #[doc = ""]
32906    #[doc = "ID: 253"]
32907    STATUSTEXT(STATUSTEXT_DATA),
32908    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
32909    #[doc = ""]
32910    #[doc = "ID: 261"]
32911    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
32912    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
32913    #[doc = ""]
32914    #[doc = "ID: 401"]
32915    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
32916    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
32917    #[doc = ""]
32918    #[doc = "ID: 2"]
32919    SYSTEM_TIME(SYSTEM_TIME_DATA),
32920    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
32921    #[doc = ""]
32922    #[doc = "ID: 1"]
32923    SYS_STATUS(SYS_STATUS_DATA),
32924    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
32925    #[doc = ""]
32926    #[doc = "ID: 135"]
32927    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
32928    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32929    #[doc = ""]
32930    #[doc = "ID: 134"]
32931    TERRAIN_DATA(TERRAIN_DATA_DATA),
32932    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32933    #[doc = ""]
32934    #[doc = "ID: 136"]
32935    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
32936    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32937    #[doc = ""]
32938    #[doc = "ID: 133"]
32939    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
32940    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
32941    #[doc = ""]
32942    #[doc = "ID: 111"]
32943    TIMESYNC(TIMESYNC_DATA),
32944    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32945    #[doc = ""]
32946    #[doc = "ID: 380"]
32947    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
32948    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32949    #[doc = ""]
32950    #[doc = "ID: 333"]
32951    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
32952    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32953    #[doc = ""]
32954    #[doc = "ID: 332"]
32955    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
32956    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32957    #[doc = ""]
32958    #[doc = "ID: 385"]
32959    TUNNEL(TUNNEL_DATA),
32960    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32961    #[doc = ""]
32962    #[doc = "ID: 311"]
32963    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
32964    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32965    #[doc = ""]
32966    #[doc = "ID: 310"]
32967    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
32968    #[doc = "The global position resulting from GPS and sensor fusion."]
32969    #[doc = ""]
32970    #[doc = "ID: 340"]
32971    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
32972    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32973    #[doc = ""]
32974    #[doc = "ID: 248"]
32975    V2_EXTENSION(V2_EXTENSION_DATA),
32976    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32977    #[doc = ""]
32978    #[doc = "ID: 74"]
32979    VFR_HUD(VFR_HUD_DATA),
32980    #[doc = "Vibration levels and accelerometer clipping."]
32981    #[doc = ""]
32982    #[doc = "ID: 241"]
32983    VIBRATION(VIBRATION_DATA),
32984    #[doc = "Global position estimate from a Vicon motion system source."]
32985    #[doc = ""]
32986    #[doc = "ID: 104"]
32987    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
32988    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32989    #[doc = ""]
32990    #[doc = "ID: 269"]
32991    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
32992    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32993    #[doc = ""]
32994    #[doc = "ID: 270"]
32995    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
32996    #[doc = "Local position/attitude estimate from a vision source."]
32997    #[doc = ""]
32998    #[doc = "ID: 102"]
32999    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33000    #[doc = "Speed estimate from a vision source."]
33001    #[doc = ""]
33002    #[doc = "ID: 103"]
33003    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33004    #[doc = "Cumulative distance traveled for each reported wheel."]
33005    #[doc = ""]
33006    #[doc = "ID: 9000"]
33007    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33008    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33009    #[doc = ""]
33010    #[doc = "ID: 299"]
33011    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33012    #[doc = "Winch status."]
33013    #[doc = ""]
33014    #[doc = "ID: 9005"]
33015    WINCH_STATUS(WINCH_STATUS_DATA),
33016    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33017    #[doc = ""]
33018    #[doc = "ID: 231"]
33019    WIND_COV(WIND_COV_DATA),
33020}
33021impl MavMessage {
33022    pub const fn all_ids() -> &'static [u32] {
33023        &[
33024            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33025            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33026            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33027            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33028            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33029            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33030            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33031            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33032            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33033            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33034            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33035            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33036            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33037            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33038            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33039            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33040            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33041            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33042            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33043            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33044            12915u32, 12918u32, 12919u32, 12920u32,
33045        ]
33046    }
33047}
33048impl Message for MavMessage {
33049    fn parse(
33050        version: MavlinkVersion,
33051        id: u32,
33052        payload: &[u8],
33053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33054        match id {
33055            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33056                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33057                    .map(Self::ACTUATOR_CONTROL_TARGET)
33058            }
33059            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33060                .map(Self::ACTUATOR_OUTPUT_STATUS),
33061            ADSB_VEHICLE_DATA::ID => {
33062                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33063            }
33064            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33065            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33066            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33067            ATTITUDE_QUATERNION_DATA::ID => {
33068                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33069            }
33070            ATTITUDE_QUATERNION_COV_DATA::ID => {
33071                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33072                    .map(Self::ATTITUDE_QUATERNION_COV)
33073            }
33074            ATTITUDE_TARGET_DATA::ID => {
33075                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33076            }
33077            ATT_POS_MOCAP_DATA::ID => {
33078                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33079            }
33080            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33081            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33082                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33083                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33084            }
33085            AUTOPILOT_VERSION_DATA::ID => {
33086                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33087            }
33088            AVAILABLE_MODES_DATA::ID => {
33089                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33090            }
33091            AVAILABLE_MODES_MONITOR_DATA::ID => {
33092                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33093                    .map(Self::AVAILABLE_MODES_MONITOR)
33094            }
33095            BATTERY_INFO_DATA::ID => {
33096                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33097            }
33098            BATTERY_STATUS_DATA::ID => {
33099                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33100            }
33101            BUTTON_CHANGE_DATA::ID => {
33102                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33103            }
33104            CAMERA_CAPTURE_STATUS_DATA::ID => {
33105                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33106            }
33107            CAMERA_FOV_STATUS_DATA::ID => {
33108                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33109            }
33110            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33111                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33112            }
33113            CAMERA_INFORMATION_DATA::ID => {
33114                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33115            }
33116            CAMERA_SETTINGS_DATA::ID => {
33117                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33118            }
33119            CAMERA_THERMAL_RANGE_DATA::ID => {
33120                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33121            }
33122            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33123                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33124                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33125            }
33126            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33127                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33128                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33129            }
33130            CAMERA_TRIGGER_DATA::ID => {
33131                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33132            }
33133            CANFD_FRAME_DATA::ID => {
33134                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33135            }
33136            CAN_FILTER_MODIFY_DATA::ID => {
33137                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33138            }
33139            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33140            CELLULAR_CONFIG_DATA::ID => {
33141                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33142            }
33143            CELLULAR_STATUS_DATA::ID => {
33144                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33145            }
33146            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33147                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33148                    .map(Self::CHANGE_OPERATOR_CONTROL)
33149            }
33150            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33151                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33152                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33153            }
33154            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33155            COMMAND_ACK_DATA::ID => {
33156                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33157            }
33158            COMMAND_CANCEL_DATA::ID => {
33159                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33160            }
33161            COMMAND_INT_DATA::ID => {
33162                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33163            }
33164            COMMAND_LONG_DATA::ID => {
33165                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33166            }
33167            COMPONENT_INFORMATION_DATA::ID => {
33168                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33169            }
33170            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33171                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33172                    .map(Self::COMPONENT_INFORMATION_BASIC)
33173            }
33174            COMPONENT_METADATA_DATA::ID => {
33175                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33176            }
33177            CONTROL_SYSTEM_STATE_DATA::ID => {
33178                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33179            }
33180            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33181                .map(Self::CURRENT_EVENT_SEQUENCE),
33182            CURRENT_MODE_DATA::ID => {
33183                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33184            }
33185            DATA_STREAM_DATA::ID => {
33186                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33187            }
33188            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33189                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33190                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33191            }
33192            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33193            DEBUG_FLOAT_ARRAY_DATA::ID => {
33194                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33195            }
33196            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33197            DISTANCE_SENSOR_DATA::ID => {
33198                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33199            }
33200            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33201            ENCAPSULATED_DATA_DATA::ID => {
33202                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33203            }
33204            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33205            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33206            ESTIMATOR_STATUS_DATA::ID => {
33207                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33208            }
33209            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33210            EXTENDED_SYS_STATE_DATA::ID => {
33211                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33212            }
33213            FENCE_STATUS_DATA::ID => {
33214                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33215            }
33216            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33217                .map(Self::FILE_TRANSFER_PROTOCOL),
33218            FLIGHT_INFORMATION_DATA::ID => {
33219                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33220            }
33221            FOLLOW_TARGET_DATA::ID => {
33222                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33223            }
33224            FUEL_STATUS_DATA::ID => {
33225                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33226            }
33227            GENERATOR_STATUS_DATA::ID => {
33228                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33229            }
33230            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33231                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33232                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33233            }
33234            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33235                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33236                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33237            }
33238            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33239                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33240                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33241            }
33242            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33243                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33244                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33245            }
33246            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33247                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33248                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33249            }
33250            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33251                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33252                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33253            }
33254            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33255                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33256                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33257            }
33258            GIMBAL_MANAGER_STATUS_DATA::ID => {
33259                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33260            }
33261            GLOBAL_POSITION_INT_DATA::ID => {
33262                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33263            }
33264            GLOBAL_POSITION_INT_COV_DATA::ID => {
33265                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33266                    .map(Self::GLOBAL_POSITION_INT_COV)
33267            }
33268            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33269                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33270                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33271            }
33272            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33273            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33274            GPS_GLOBAL_ORIGIN_DATA::ID => {
33275                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33276            }
33277            GPS_INJECT_DATA_DATA::ID => {
33278                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33279            }
33280            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33281            GPS_RAW_INT_DATA::ID => {
33282                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33283            }
33284            GPS_RTCM_DATA_DATA::ID => {
33285                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33286            }
33287            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33288            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33289            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33290            HIGHRES_IMU_DATA::ID => {
33291                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33292            }
33293            HIGH_LATENCY_DATA::ID => {
33294                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33295            }
33296            HIGH_LATENCY2_DATA::ID => {
33297                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33298            }
33299            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33300                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33301            }
33302            HIL_CONTROLS_DATA::ID => {
33303                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33304            }
33305            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33306            HIL_OPTICAL_FLOW_DATA::ID => {
33307                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33308            }
33309            HIL_RC_INPUTS_RAW_DATA::ID => {
33310                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33311            }
33312            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33313            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33314            HIL_STATE_QUATERNION_DATA::ID => {
33315                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33316            }
33317            HOME_POSITION_DATA::ID => {
33318                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33319            }
33320            HYGROMETER_SENSOR_DATA::ID => {
33321                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33322            }
33323            ILLUMINATOR_STATUS_DATA::ID => {
33324                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33325            }
33326            ISBD_LINK_STATUS_DATA::ID => {
33327                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33328            }
33329            LANDING_TARGET_DATA::ID => {
33330                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33331            }
33332            LINK_NODE_STATUS_DATA::ID => {
33333                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33334            }
33335            LOCAL_POSITION_NED_DATA::ID => {
33336                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33337            }
33338            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33339                .map(Self::LOCAL_POSITION_NED_COV),
33340            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33341                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33342                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33343            }
33344            LOGGING_ACK_DATA::ID => {
33345                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33346            }
33347            LOGGING_DATA_DATA::ID => {
33348                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33349            }
33350            LOGGING_DATA_ACKED_DATA::ID => {
33351                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33352            }
33353            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33354            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33355            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33356            LOG_REQUEST_DATA_DATA::ID => {
33357                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33358            }
33359            LOG_REQUEST_END_DATA::ID => {
33360                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33361            }
33362            LOG_REQUEST_LIST_DATA::ID => {
33363                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33364            }
33365            MAG_CAL_REPORT_DATA::ID => {
33366                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33367            }
33368            MANUAL_CONTROL_DATA::ID => {
33369                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33370            }
33371            MANUAL_SETPOINT_DATA::ID => {
33372                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33373            }
33374            MEMORY_VECT_DATA::ID => {
33375                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33376            }
33377            MESSAGE_INTERVAL_DATA::ID => {
33378                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33379            }
33380            MISSION_ACK_DATA::ID => {
33381                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33382            }
33383            MISSION_CLEAR_ALL_DATA::ID => {
33384                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33385            }
33386            MISSION_COUNT_DATA::ID => {
33387                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33388            }
33389            MISSION_CURRENT_DATA::ID => {
33390                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33391            }
33392            MISSION_ITEM_DATA::ID => {
33393                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33394            }
33395            MISSION_ITEM_INT_DATA::ID => {
33396                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33397            }
33398            MISSION_ITEM_REACHED_DATA::ID => {
33399                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33400            }
33401            MISSION_REQUEST_DATA::ID => {
33402                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33403            }
33404            MISSION_REQUEST_INT_DATA::ID => {
33405                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33406            }
33407            MISSION_REQUEST_LIST_DATA::ID => {
33408                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33409            }
33410            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33411                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33412                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33413            }
33414            MISSION_SET_CURRENT_DATA::ID => {
33415                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33416            }
33417            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33418                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33419                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33420            }
33421            MOUNT_ORIENTATION_DATA::ID => {
33422                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33423            }
33424            NAMED_VALUE_FLOAT_DATA::ID => {
33425                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33426            }
33427            NAMED_VALUE_INT_DATA::ID => {
33428                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33429            }
33430            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33431                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33432            }
33433            OBSTACLE_DISTANCE_DATA::ID => {
33434                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33435            }
33436            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33437            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33438                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33439                    .map(Self::ONBOARD_COMPUTER_STATUS)
33440            }
33441            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33442                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33443                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33444            }
33445            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33446                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33447                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33448            }
33449            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33450                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33451            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33452                .map(Self::OPEN_DRONE_ID_LOCATION),
33453            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33454                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33455                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33456            }
33457            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33458                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33459                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33460            }
33461            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33462                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33463            }
33464            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33465                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33466            }
33467            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33468                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33469                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33470            }
33471            OPTICAL_FLOW_DATA::ID => {
33472                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33473            }
33474            OPTICAL_FLOW_RAD_DATA::ID => {
33475                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33476            }
33477            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33478                .map(Self::ORBIT_EXECUTION_STATUS),
33479            PARAM_EXT_ACK_DATA::ID => {
33480                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33481            }
33482            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33483                .map(Self::PARAM_EXT_REQUEST_LIST),
33484            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33485                .map(Self::PARAM_EXT_REQUEST_READ),
33486            PARAM_EXT_SET_DATA::ID => {
33487                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33488            }
33489            PARAM_EXT_VALUE_DATA::ID => {
33490                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33491            }
33492            PARAM_MAP_RC_DATA::ID => {
33493                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33494            }
33495            PARAM_REQUEST_LIST_DATA::ID => {
33496                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33497            }
33498            PARAM_REQUEST_READ_DATA::ID => {
33499                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33500            }
33501            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33502            PARAM_VALUE_DATA::ID => {
33503                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33504            }
33505            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33506            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33507            PLAY_TUNE_V2_DATA::ID => {
33508                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33509            }
33510            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33511                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33512                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33513            }
33514            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33515                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33516                    .map(Self::POSITION_TARGET_LOCAL_NED)
33517            }
33518            POWER_STATUS_DATA::ID => {
33519                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33520            }
33521            PROTOCOL_VERSION_DATA::ID => {
33522                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33523            }
33524            RADIO_STATUS_DATA::ID => {
33525                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33526            }
33527            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33528            RAW_PRESSURE_DATA::ID => {
33529                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33530            }
33531            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33532            RC_CHANNELS_DATA::ID => {
33533                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33534            }
33535            RC_CHANNELS_OVERRIDE_DATA::ID => {
33536                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33537            }
33538            RC_CHANNELS_RAW_DATA::ID => {
33539                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33540            }
33541            RC_CHANNELS_SCALED_DATA::ID => {
33542                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33543            }
33544            REQUEST_DATA_STREAM_DATA::ID => {
33545                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33546            }
33547            REQUEST_EVENT_DATA::ID => {
33548                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33549            }
33550            RESOURCE_REQUEST_DATA::ID => {
33551                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33552            }
33553            RESPONSE_EVENT_ERROR_DATA::ID => {
33554                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33555            }
33556            SAFETY_ALLOWED_AREA_DATA::ID => {
33557                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33558            }
33559            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33560                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33561                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33562            }
33563            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33564            SCALED_IMU2_DATA::ID => {
33565                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33566            }
33567            SCALED_IMU3_DATA::ID => {
33568                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33569            }
33570            SCALED_PRESSURE_DATA::ID => {
33571                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33572            }
33573            SCALED_PRESSURE2_DATA::ID => {
33574                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
33575            }
33576            SCALED_PRESSURE3_DATA::ID => {
33577                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
33578            }
33579            SERIAL_CONTROL_DATA::ID => {
33580                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
33581            }
33582            SERVO_OUTPUT_RAW_DATA::ID => {
33583                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
33584            }
33585            SETUP_SIGNING_DATA::ID => {
33586                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
33587            }
33588            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
33589                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33590                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
33591            }
33592            SET_ATTITUDE_TARGET_DATA::ID => {
33593                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
33594            }
33595            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
33596                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
33597            }
33598            SET_HOME_POSITION_DATA::ID => {
33599                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
33600            }
33601            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
33602            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33603                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33604                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
33605            }
33606            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
33607                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33608                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
33609            }
33610            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
33611            SMART_BATTERY_INFO_DATA::ID => {
33612                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
33613            }
33614            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
33615            STORAGE_INFORMATION_DATA::ID => {
33616                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
33617            }
33618            SUPPORTED_TUNES_DATA::ID => {
33619                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
33620            }
33621            SYSTEM_TIME_DATA::ID => {
33622                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
33623            }
33624            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
33625            TERRAIN_CHECK_DATA::ID => {
33626                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
33627            }
33628            TERRAIN_DATA_DATA::ID => {
33629                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
33630            }
33631            TERRAIN_REPORT_DATA::ID => {
33632                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
33633            }
33634            TERRAIN_REQUEST_DATA::ID => {
33635                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
33636            }
33637            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
33638            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
33639                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
33640                    .map(Self::TIME_ESTIMATE_TO_TARGET)
33641            }
33642            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33643                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
33644                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
33645            }
33646            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33647                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
33648                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
33649            }
33650            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
33651            UAVCAN_NODE_INFO_DATA::ID => {
33652                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
33653            }
33654            UAVCAN_NODE_STATUS_DATA::ID => {
33655                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
33656            }
33657            UTM_GLOBAL_POSITION_DATA::ID => {
33658                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
33659            }
33660            V2_EXTENSION_DATA::ID => {
33661                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
33662            }
33663            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
33664            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
33665            VICON_POSITION_ESTIMATE_DATA::ID => {
33666                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
33667                    .map(Self::VICON_POSITION_ESTIMATE)
33668            }
33669            VIDEO_STREAM_INFORMATION_DATA::ID => {
33670                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
33671                    .map(Self::VIDEO_STREAM_INFORMATION)
33672            }
33673            VIDEO_STREAM_STATUS_DATA::ID => {
33674                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
33675            }
33676            VISION_POSITION_ESTIMATE_DATA::ID => {
33677                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33678                    .map(Self::VISION_POSITION_ESTIMATE)
33679            }
33680            VISION_SPEED_ESTIMATE_DATA::ID => {
33681                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
33682            }
33683            WHEEL_DISTANCE_DATA::ID => {
33684                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
33685            }
33686            WIFI_CONFIG_AP_DATA::ID => {
33687                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
33688            }
33689            WINCH_STATUS_DATA::ID => {
33690                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
33691            }
33692            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
33693            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
33694        }
33695    }
33696    fn message_name(&self) -> &'static str {
33697        match self {
33698            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
33699            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
33700            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
33701            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
33702            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
33703            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
33704            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
33705            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
33706            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
33707            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
33708            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
33709            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
33710                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
33711            }
33712            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
33713            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
33714            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
33715            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
33716            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
33717            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
33718            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
33719            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
33720            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
33721            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
33722            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
33723            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
33724            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33725            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33726            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
33727            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
33728            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
33729            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
33730            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
33731            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
33732            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
33733            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33734            Self::COLLISION(..) => COLLISION_DATA::NAME,
33735            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
33736            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
33737            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
33738            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
33739            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
33740            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
33741            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
33742            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
33743            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
33744            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
33745            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
33746            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33747            Self::DEBUG(..) => DEBUG_DATA::NAME,
33748            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
33749            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
33750            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
33751            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
33752            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
33753            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
33754            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
33755            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
33756            Self::EVENT(..) => EVENT_DATA::NAME,
33757            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
33758            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
33759            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
33760            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
33761            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
33762            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
33763            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
33764            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33765            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33766            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33767            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33768            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33769            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
33770                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
33771            }
33772            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33773            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
33774            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
33775            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
33776            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33777            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
33778            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
33779            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
33780            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
33781            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
33782            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
33783            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
33784            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
33785            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
33786            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
33787            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
33788            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
33789            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
33790            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
33791            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
33792            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
33793            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
33794            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
33795            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
33796            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
33797            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
33798            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
33799            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
33800            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
33801            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
33802            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
33803            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
33804            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
33805            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
33806            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
33807                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
33808            }
33809            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
33810            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
33811            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
33812            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
33813            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
33814            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
33815            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
33816            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
33817            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
33818            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
33819            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
33820            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
33821            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
33822            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
33823            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
33824            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
33825            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
33826            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
33827            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
33828            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
33829            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
33830            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
33831            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
33832            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
33833            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33834            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
33835            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33836            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
33837            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
33838            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
33839            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
33840            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
33841            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
33842            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
33843            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33844            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33845            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33846            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
33847            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33848            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33849            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33850            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33851            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33852            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
33853            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
33854            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
33855            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
33856            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
33857            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
33858            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
33859            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
33860            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
33861            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
33862            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
33863            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
33864            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
33865            Self::PING(..) => PING_DATA::NAME,
33866            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
33867            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
33868            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33869            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
33870            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
33871            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
33872            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
33873            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
33874            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
33875            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
33876            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
33877            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
33878            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
33879            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
33880            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
33881            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
33882            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
33883            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
33884            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
33885            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33886            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
33887            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
33888            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
33889            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
33890            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
33891            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
33892            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
33893            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
33894            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
33895            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33896            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
33897            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33898            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
33899            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
33900            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33901            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33902            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
33903            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
33904            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
33905            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
33906            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
33907            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
33908            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
33909            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
33910            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
33911            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
33912            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
33913            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
33914            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33915            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
33916                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
33917            }
33918            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
33919                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
33920            }
33921            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
33922            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
33923            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
33924            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
33925            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
33926            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
33927            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
33928            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
33929            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
33930            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
33931            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
33932            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
33933            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
33934            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
33935            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
33936            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
33937        }
33938    }
33939    fn message_id(&self) -> u32 {
33940        match self {
33941            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
33942            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
33943            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
33944            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
33945            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
33946            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
33947            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
33948            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
33949            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
33950            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
33951            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
33952            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
33953                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
33954            }
33955            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
33956            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
33957            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
33958            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
33959            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
33960            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
33961            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
33962            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
33963            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
33964            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
33965            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
33966            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
33967            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33968            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33969            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
33970            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
33971            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
33972            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
33973            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
33974            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
33975            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
33976            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33977            Self::COLLISION(..) => COLLISION_DATA::ID,
33978            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
33979            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
33980            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
33981            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
33982            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
33983            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
33984            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
33985            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
33986            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
33987            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
33988            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
33989            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33990            Self::DEBUG(..) => DEBUG_DATA::ID,
33991            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
33992            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
33993            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
33994            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
33995            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
33996            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
33997            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
33998            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
33999            Self::EVENT(..) => EVENT_DATA::ID,
34000            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34001            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34002            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34003            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34004            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34005            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34006            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34007            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34008            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34009            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34010            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34011            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34012            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34013                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34014            }
34015            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34016            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34017            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34018            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34019            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34020            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34021            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34022            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34023            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34024            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34025            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34026            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34027            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34028            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34029            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34030            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34031            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34032            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34033            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34034            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34035            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34036            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34037            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34038            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34039            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34040            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34041            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34042            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34043            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34044            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34045            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34046            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34047            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34048            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34049            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34050                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34051            }
34052            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34053            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34054            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34055            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34056            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34057            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34058            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34059            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34060            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34061            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34062            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34063            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34064            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34065            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34066            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34067            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34068            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34069            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34070            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34071            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34072            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34073            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34074            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34075            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34076            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34077            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34078            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34079            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34080            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34081            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34082            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34083            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34084            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34085            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34086            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34087            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34088            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34089            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34090            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34091            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34092            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34093            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34094            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34095            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34096            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34097            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34098            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34099            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34100            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34101            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34102            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34103            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34104            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34105            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34106            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34107            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34108            Self::PING(..) => PING_DATA::ID,
34109            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34110            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34111            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34112            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34113            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34114            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34115            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34116            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34117            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34118            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34119            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34120            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34121            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34122            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34123            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34124            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34125            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34126            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34127            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34128            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34129            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34130            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34131            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34132            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34133            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34134            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34135            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34136            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34137            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34138            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34139            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34140            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34141            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34142            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34143            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34144            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34145            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34146            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34147            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34148            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34149            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34150            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34151            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34152            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34153            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34154            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34155            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34156            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34157            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34158            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34159            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34160                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34161            }
34162            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34163            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34164            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34165            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34166            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34167            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34168            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34169            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34170            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34171            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34172            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34173            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34174            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34175            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34176            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34177            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34178        }
34179    }
34180    fn message_id_from_name(name: &str) -> Option<u32> {
34181        match name {
34182            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34183            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34184            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34185            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34186            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34187            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34188            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34189            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34190            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34191            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34192            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34193            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34194                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34195            }
34196            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34197            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34198            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34199            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34200            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34201            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34202            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34203            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34204            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34205            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34206            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34207            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34208            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34209            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34210            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34211            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34212            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34213            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34214            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34215            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34216            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34217            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34218            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34219            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34220            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34221            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34222            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34223            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34224            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34225            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34226            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34227            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34228            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34229            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34230            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34231            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34232            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34233            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34234            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34235            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34236            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34237            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34238            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34239            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34240            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34241            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34242            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34243            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34244            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34245            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34246            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34247            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34248            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34249                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34250            }
34251            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34252            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34253            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34254            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34255            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34256                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34257            }
34258            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34259            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34260            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34261            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34262            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34263                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34264            }
34265            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34266            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34267            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34268            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34269            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34270            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34271            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34272            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34273            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34274            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34275            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34276            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34277            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34278            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34279            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34280            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34281            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34282            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34283            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34284            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34285            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34286            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34287            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34288            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34289            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34290            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34291            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34292            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34293            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34294            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34295                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34296            }
34297            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34298            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34299            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34300            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34301            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34302            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34303            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34304            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34305            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34306            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34307            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34308            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34309            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34310            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34311            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34312            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34313            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34314            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34315            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34316            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34317            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34318            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34319            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34320            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34321            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34322            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34323            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34324            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34325            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34326            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34327            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34328            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34329            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34330            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34331            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34332            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34333            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34334            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34335            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34336            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34337            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34338            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34339            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34340            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34341            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34342            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34343            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34344            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34345            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34346            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34347            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34348            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34349            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34350            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34351            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34352            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34353            PING_DATA::NAME => Some(PING_DATA::ID),
34354            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34355            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34356            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34357            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34358            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34359            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34360            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34361            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34362            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34363            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34364            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34365            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34366            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34367            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34368            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34369            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34370            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34371            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34372            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34373            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34374            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34375            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34376            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34377            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34378            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34379            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34380            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34381            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34382            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34383            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34384            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34385            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34386            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34387            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34388            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34389                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34390            }
34391            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34392                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34393            }
34394            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34395            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34396            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34397            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34398            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34399            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34400            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34401            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34402            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34403            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34404            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34405            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34406            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34407            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34408                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34409            }
34410            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34411                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34412            }
34413            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34414            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34415            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34416            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34417            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34418            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34419            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34420            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34421            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34422            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34423            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34424            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34425            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34426            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34427            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34428            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34429            _ => None,
34430        }
34431    }
34432    fn default_message_from_id(id: u32) -> Option<Self> {
34433        match id {
34434            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34435                ACTUATOR_CONTROL_TARGET_DATA::default(),
34436            )),
34437            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34438                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34439            )),
34440            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34441            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34442            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34443            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34444            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34445                ATTITUDE_QUATERNION_DATA::default(),
34446            )),
34447            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34448                ATTITUDE_QUATERNION_COV_DATA::default(),
34449            )),
34450            ATTITUDE_TARGET_DATA::ID => {
34451                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34452            }
34453            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34454            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34455            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34456                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34457                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34458                ))
34459            }
34460            AUTOPILOT_VERSION_DATA::ID => {
34461                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34462            }
34463            AVAILABLE_MODES_DATA::ID => {
34464                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34465            }
34466            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34467                AVAILABLE_MODES_MONITOR_DATA::default(),
34468            )),
34469            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34470            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34471            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34472            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34473                CAMERA_CAPTURE_STATUS_DATA::default(),
34474            )),
34475            CAMERA_FOV_STATUS_DATA::ID => {
34476                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34477            }
34478            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34479                CAMERA_IMAGE_CAPTURED_DATA::default(),
34480            )),
34481            CAMERA_INFORMATION_DATA::ID => {
34482                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34483            }
34484            CAMERA_SETTINGS_DATA::ID => {
34485                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34486            }
34487            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34488                CAMERA_THERMAL_RANGE_DATA::default(),
34489            )),
34490            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34491                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34492            )),
34493            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34494                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34495            )),
34496            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34497            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34498            CAN_FILTER_MODIFY_DATA::ID => {
34499                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34500            }
34501            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34502            CELLULAR_CONFIG_DATA::ID => {
34503                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34504            }
34505            CELLULAR_STATUS_DATA::ID => {
34506                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34507            }
34508            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34509                CHANGE_OPERATOR_CONTROL_DATA::default(),
34510            )),
34511            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34512                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34513            )),
34514            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34515            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34516            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34517            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34518            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34519            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34520                COMPONENT_INFORMATION_DATA::default(),
34521            )),
34522            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34523                COMPONENT_INFORMATION_BASIC_DATA::default(),
34524            )),
34525            COMPONENT_METADATA_DATA::ID => {
34526                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34527            }
34528            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34529                CONTROL_SYSTEM_STATE_DATA::default(),
34530            )),
34531            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34532                CURRENT_EVENT_SEQUENCE_DATA::default(),
34533            )),
34534            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34535            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34536            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34537                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34538            )),
34539            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34540            DEBUG_FLOAT_ARRAY_DATA::ID => {
34541                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34542            }
34543            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
34544            DISTANCE_SENSOR_DATA::ID => {
34545                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
34546            }
34547            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
34548            ENCAPSULATED_DATA_DATA::ID => {
34549                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
34550            }
34551            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
34552            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
34553            ESTIMATOR_STATUS_DATA::ID => {
34554                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
34555            }
34556            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
34557            EXTENDED_SYS_STATE_DATA::ID => {
34558                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
34559            }
34560            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
34561            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34562                FILE_TRANSFER_PROTOCOL_DATA::default(),
34563            )),
34564            FLIGHT_INFORMATION_DATA::ID => {
34565                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
34566            }
34567            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
34568            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
34569            GENERATOR_STATUS_DATA::ID => {
34570                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
34571            }
34572            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34573                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
34574            )),
34575            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34576                GIMBAL_DEVICE_INFORMATION_DATA::default(),
34577            )),
34578            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
34579                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
34580            )),
34581            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
34582                GIMBAL_MANAGER_INFORMATION_DATA::default(),
34583            )),
34584            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
34585                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
34586            )),
34587            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34588                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
34589                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
34590                ))
34591            }
34592            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
34593                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
34594            )),
34595            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
34596                GIMBAL_MANAGER_STATUS_DATA::default(),
34597            )),
34598            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
34599                GLOBAL_POSITION_INT_DATA::default(),
34600            )),
34601            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
34602                GLOBAL_POSITION_INT_COV_DATA::default(),
34603            )),
34604            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34605                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
34606                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
34607                ))
34608            }
34609            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
34610            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
34611            GPS_GLOBAL_ORIGIN_DATA::ID => {
34612                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
34613            }
34614            GPS_INJECT_DATA_DATA::ID => {
34615                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
34616            }
34617            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
34618            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
34619            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
34620            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
34621            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
34622            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
34623            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
34624            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
34625            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
34626            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
34627                HIL_ACTUATOR_CONTROLS_DATA::default(),
34628            )),
34629            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
34630            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
34631            HIL_OPTICAL_FLOW_DATA::ID => {
34632                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
34633            }
34634            HIL_RC_INPUTS_RAW_DATA::ID => {
34635                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
34636            }
34637            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
34638            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
34639            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
34640                HIL_STATE_QUATERNION_DATA::default(),
34641            )),
34642            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
34643            HYGROMETER_SENSOR_DATA::ID => {
34644                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
34645            }
34646            ILLUMINATOR_STATUS_DATA::ID => {
34647                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
34648            }
34649            ISBD_LINK_STATUS_DATA::ID => {
34650                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
34651            }
34652            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
34653            LINK_NODE_STATUS_DATA::ID => {
34654                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
34655            }
34656            LOCAL_POSITION_NED_DATA::ID => {
34657                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
34658            }
34659            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
34660                LOCAL_POSITION_NED_COV_DATA::default(),
34661            )),
34662            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34663                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
34664                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
34665                ))
34666            }
34667            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
34668            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
34669            LOGGING_DATA_ACKED_DATA::ID => {
34670                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
34671            }
34672            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
34673            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
34674            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
34675            LOG_REQUEST_DATA_DATA::ID => {
34676                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
34677            }
34678            LOG_REQUEST_END_DATA::ID => {
34679                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
34680            }
34681            LOG_REQUEST_LIST_DATA::ID => {
34682                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
34683            }
34684            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
34685            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
34686            MANUAL_SETPOINT_DATA::ID => {
34687                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
34688            }
34689            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
34690            MESSAGE_INTERVAL_DATA::ID => {
34691                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
34692            }
34693            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
34694            MISSION_CLEAR_ALL_DATA::ID => {
34695                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
34696            }
34697            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
34698            MISSION_CURRENT_DATA::ID => {
34699                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
34700            }
34701            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
34702            MISSION_ITEM_INT_DATA::ID => {
34703                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
34704            }
34705            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
34706                MISSION_ITEM_REACHED_DATA::default(),
34707            )),
34708            MISSION_REQUEST_DATA::ID => {
34709                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
34710            }
34711            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
34712                MISSION_REQUEST_INT_DATA::default(),
34713            )),
34714            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
34715                MISSION_REQUEST_LIST_DATA::default(),
34716            )),
34717            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34718                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
34719            )),
34720            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
34721                MISSION_SET_CURRENT_DATA::default(),
34722            )),
34723            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
34724                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
34725            )),
34726            MOUNT_ORIENTATION_DATA::ID => {
34727                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
34728            }
34729            NAMED_VALUE_FLOAT_DATA::ID => {
34730                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
34731            }
34732            NAMED_VALUE_INT_DATA::ID => {
34733                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
34734            }
34735            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
34736                NAV_CONTROLLER_OUTPUT_DATA::default(),
34737            )),
34738            OBSTACLE_DISTANCE_DATA::ID => {
34739                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
34740            }
34741            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
34742            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
34743                ONBOARD_COMPUTER_STATUS_DATA::default(),
34744            )),
34745            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
34746                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
34747            )),
34748            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
34749                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
34750            )),
34751            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
34752                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
34753            )),
34754            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
34755                OPEN_DRONE_ID_LOCATION_DATA::default(),
34756            )),
34757            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
34758                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
34759            )),
34760            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
34761                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
34762            )),
34763            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
34764                OPEN_DRONE_ID_SELF_ID_DATA::default(),
34765            )),
34766            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
34767                OPEN_DRONE_ID_SYSTEM_DATA::default(),
34768            )),
34769            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
34770                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
34771            )),
34772            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
34773            OPTICAL_FLOW_RAD_DATA::ID => {
34774                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
34775            }
34776            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
34777                ORBIT_EXECUTION_STATUS_DATA::default(),
34778            )),
34779            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
34780            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
34781                PARAM_EXT_REQUEST_LIST_DATA::default(),
34782            )),
34783            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
34784                PARAM_EXT_REQUEST_READ_DATA::default(),
34785            )),
34786            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
34787            PARAM_EXT_VALUE_DATA::ID => {
34788                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
34789            }
34790            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
34791            PARAM_REQUEST_LIST_DATA::ID => {
34792                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
34793            }
34794            PARAM_REQUEST_READ_DATA::ID => {
34795                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
34796            }
34797            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
34798            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
34799            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
34800            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
34801            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
34802            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
34803                POSITION_TARGET_GLOBAL_INT_DATA::default(),
34804            )),
34805            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
34806                POSITION_TARGET_LOCAL_NED_DATA::default(),
34807            )),
34808            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
34809            PROTOCOL_VERSION_DATA::ID => {
34810                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
34811            }
34812            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
34813            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
34814            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
34815            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
34816            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
34817            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
34818                RC_CHANNELS_OVERRIDE_DATA::default(),
34819            )),
34820            RC_CHANNELS_RAW_DATA::ID => {
34821                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
34822            }
34823            RC_CHANNELS_SCALED_DATA::ID => {
34824                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
34825            }
34826            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34827                REQUEST_DATA_STREAM_DATA::default(),
34828            )),
34829            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
34830            RESOURCE_REQUEST_DATA::ID => {
34831                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
34832            }
34833            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34834                RESPONSE_EVENT_ERROR_DATA::default(),
34835            )),
34836            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34837                SAFETY_ALLOWED_AREA_DATA::default(),
34838            )),
34839            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34840                SAFETY_SET_ALLOWED_AREA_DATA::default(),
34841            )),
34842            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
34843            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
34844            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
34845            SCALED_PRESSURE_DATA::ID => {
34846                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
34847            }
34848            SCALED_PRESSURE2_DATA::ID => {
34849                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
34850            }
34851            SCALED_PRESSURE3_DATA::ID => {
34852                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
34853            }
34854            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
34855            SERVO_OUTPUT_RAW_DATA::ID => {
34856                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
34857            }
34858            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
34859            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34860                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
34861            )),
34862            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34863                SET_ATTITUDE_TARGET_DATA::default(),
34864            )),
34865            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34866                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
34867            )),
34868            SET_HOME_POSITION_DATA::ID => {
34869                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
34870            }
34871            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
34872            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34873                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
34874            )),
34875            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34876                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
34877            )),
34878            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
34879            SMART_BATTERY_INFO_DATA::ID => {
34880                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
34881            }
34882            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
34883            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34884                STORAGE_INFORMATION_DATA::default(),
34885            )),
34886            SUPPORTED_TUNES_DATA::ID => {
34887                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
34888            }
34889            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
34890            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
34891            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
34892            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
34893            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
34894            TERRAIN_REQUEST_DATA::ID => {
34895                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
34896            }
34897            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
34898            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34899                TIME_ESTIMATE_TO_TARGET_DATA::default(),
34900            )),
34901            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34902                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34903                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
34904                ))
34905            }
34906            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34907                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34908                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
34909                ))
34910            }
34911            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
34912            UAVCAN_NODE_INFO_DATA::ID => {
34913                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
34914            }
34915            UAVCAN_NODE_STATUS_DATA::ID => {
34916                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
34917            }
34918            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34919                UTM_GLOBAL_POSITION_DATA::default(),
34920            )),
34921            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
34922            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
34923            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
34924            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34925                VICON_POSITION_ESTIMATE_DATA::default(),
34926            )),
34927            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34928                VIDEO_STREAM_INFORMATION_DATA::default(),
34929            )),
34930            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34931                VIDEO_STREAM_STATUS_DATA::default(),
34932            )),
34933            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34934                VISION_POSITION_ESTIMATE_DATA::default(),
34935            )),
34936            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34937                VISION_SPEED_ESTIMATE_DATA::default(),
34938            )),
34939            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
34940            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
34941            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
34942            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
34943            _ => None,
34944        }
34945    }
34946    #[cfg(feature = "arbitrary")]
34947    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
34948        match id {
34949            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34950                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34951            )),
34952            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34953                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
34954            )),
34955            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
34956            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
34957            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
34958            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
34959            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34960                ATTITUDE_QUATERNION_DATA::random(rng),
34961            )),
34962            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34963                ATTITUDE_QUATERNION_COV_DATA::random(rng),
34964            )),
34965            ATTITUDE_TARGET_DATA::ID => {
34966                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
34967            }
34968            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
34969            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
34970            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34971                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34972                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
34973                ))
34974            }
34975            AUTOPILOT_VERSION_DATA::ID => {
34976                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
34977            }
34978            AVAILABLE_MODES_DATA::ID => {
34979                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
34980            }
34981            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34982                AVAILABLE_MODES_MONITOR_DATA::random(rng),
34983            )),
34984            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
34985            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
34986            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
34987            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34988                CAMERA_CAPTURE_STATUS_DATA::random(rng),
34989            )),
34990            CAMERA_FOV_STATUS_DATA::ID => {
34991                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
34992            }
34993            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34994                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
34995            )),
34996            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
34997                CAMERA_INFORMATION_DATA::random(rng),
34998            )),
34999            CAMERA_SETTINGS_DATA::ID => {
35000                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35001            }
35002            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35003                CAMERA_THERMAL_RANGE_DATA::random(rng),
35004            )),
35005            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35006                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35007            )),
35008            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35009                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35010            )),
35011            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35012            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35013            CAN_FILTER_MODIFY_DATA::ID => {
35014                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35015            }
35016            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35017            CELLULAR_CONFIG_DATA::ID => {
35018                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35019            }
35020            CELLULAR_STATUS_DATA::ID => {
35021                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35022            }
35023            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35024                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35025            )),
35026            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35027                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35028            )),
35029            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35030            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35031            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35032            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35033            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35034            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35035                COMPONENT_INFORMATION_DATA::random(rng),
35036            )),
35037            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35038                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35039            )),
35040            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35041                COMPONENT_METADATA_DATA::random(rng),
35042            )),
35043            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35044                CONTROL_SYSTEM_STATE_DATA::random(rng),
35045            )),
35046            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35047                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35048            )),
35049            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35050            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35051            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35052                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35053            )),
35054            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35055            DEBUG_FLOAT_ARRAY_DATA::ID => {
35056                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35057            }
35058            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35059            DISTANCE_SENSOR_DATA::ID => {
35060                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35061            }
35062            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35063            ENCAPSULATED_DATA_DATA::ID => {
35064                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35065            }
35066            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35067            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35068            ESTIMATOR_STATUS_DATA::ID => {
35069                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35070            }
35071            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35072            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35073                EXTENDED_SYS_STATE_DATA::random(rng),
35074            )),
35075            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35076            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35077                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35078            )),
35079            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35080                FLIGHT_INFORMATION_DATA::random(rng),
35081            )),
35082            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35083            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35084            GENERATOR_STATUS_DATA::ID => {
35085                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35086            }
35087            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35088                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35089            )),
35090            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35091                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35092            )),
35093            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35094                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35095            )),
35096            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35097                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35098            )),
35099            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35100                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35101            )),
35102            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35103                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35104                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35105                ))
35106            }
35107            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35108                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35109            )),
35110            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35111                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35112            )),
35113            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35114                GLOBAL_POSITION_INT_DATA::random(rng),
35115            )),
35116            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35117                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35118            )),
35119            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35120                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35121                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35122                ))
35123            }
35124            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35125            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35126            GPS_GLOBAL_ORIGIN_DATA::ID => {
35127                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35128            }
35129            GPS_INJECT_DATA_DATA::ID => {
35130                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35131            }
35132            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35133            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35134            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35135            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35136            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35137            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35138            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35139            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35140            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35141            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35142                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35143            )),
35144            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35145            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35146            HIL_OPTICAL_FLOW_DATA::ID => {
35147                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35148            }
35149            HIL_RC_INPUTS_RAW_DATA::ID => {
35150                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35151            }
35152            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35153            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35154            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35155                HIL_STATE_QUATERNION_DATA::random(rng),
35156            )),
35157            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35158            HYGROMETER_SENSOR_DATA::ID => {
35159                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35160            }
35161            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35162                ILLUMINATOR_STATUS_DATA::random(rng),
35163            )),
35164            ISBD_LINK_STATUS_DATA::ID => {
35165                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35166            }
35167            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35168            LINK_NODE_STATUS_DATA::ID => {
35169                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35170            }
35171            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35172                LOCAL_POSITION_NED_DATA::random(rng),
35173            )),
35174            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35175                LOCAL_POSITION_NED_COV_DATA::random(rng),
35176            )),
35177            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35178                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35179                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35180                ))
35181            }
35182            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35183            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35184            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35185                LOGGING_DATA_ACKED_DATA::random(rng),
35186            )),
35187            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35188            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35189            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35190            LOG_REQUEST_DATA_DATA::ID => {
35191                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35192            }
35193            LOG_REQUEST_END_DATA::ID => {
35194                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35195            }
35196            LOG_REQUEST_LIST_DATA::ID => {
35197                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35198            }
35199            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35200            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35201            MANUAL_SETPOINT_DATA::ID => {
35202                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35203            }
35204            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35205            MESSAGE_INTERVAL_DATA::ID => {
35206                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35207            }
35208            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35209            MISSION_CLEAR_ALL_DATA::ID => {
35210                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35211            }
35212            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35213            MISSION_CURRENT_DATA::ID => {
35214                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35215            }
35216            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35217            MISSION_ITEM_INT_DATA::ID => {
35218                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35219            }
35220            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35221                MISSION_ITEM_REACHED_DATA::random(rng),
35222            )),
35223            MISSION_REQUEST_DATA::ID => {
35224                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35225            }
35226            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35227                MISSION_REQUEST_INT_DATA::random(rng),
35228            )),
35229            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35230                MISSION_REQUEST_LIST_DATA::random(rng),
35231            )),
35232            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35233                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35234            )),
35235            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35236                MISSION_SET_CURRENT_DATA::random(rng),
35237            )),
35238            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35239                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35240            )),
35241            MOUNT_ORIENTATION_DATA::ID => {
35242                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35243            }
35244            NAMED_VALUE_FLOAT_DATA::ID => {
35245                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35246            }
35247            NAMED_VALUE_INT_DATA::ID => {
35248                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35249            }
35250            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35251                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35252            )),
35253            OBSTACLE_DISTANCE_DATA::ID => {
35254                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35255            }
35256            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35257            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35258                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35259            )),
35260            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35261                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35262            )),
35263            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35264                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35265            )),
35266            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35267                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35268            )),
35269            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35270                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35271            )),
35272            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35273                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35274            )),
35275            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35276                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35277            )),
35278            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35279                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35280            )),
35281            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35282                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35283            )),
35284            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35285                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35286            )),
35287            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35288            OPTICAL_FLOW_RAD_DATA::ID => {
35289                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35290            }
35291            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35292                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35293            )),
35294            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35295            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35296                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35297            )),
35298            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35299                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35300            )),
35301            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35302            PARAM_EXT_VALUE_DATA::ID => {
35303                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35304            }
35305            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35306            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35307                PARAM_REQUEST_LIST_DATA::random(rng),
35308            )),
35309            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35310                PARAM_REQUEST_READ_DATA::random(rng),
35311            )),
35312            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35313            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35314            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35315            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35316            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35317            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35318                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35319            )),
35320            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35321                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35322            )),
35323            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35324            PROTOCOL_VERSION_DATA::ID => {
35325                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35326            }
35327            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35328            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35329            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35330            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35331            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35332            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35333                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35334            )),
35335            RC_CHANNELS_RAW_DATA::ID => {
35336                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35337            }
35338            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35339                RC_CHANNELS_SCALED_DATA::random(rng),
35340            )),
35341            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35342                REQUEST_DATA_STREAM_DATA::random(rng),
35343            )),
35344            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35345            RESOURCE_REQUEST_DATA::ID => {
35346                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35347            }
35348            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35349                RESPONSE_EVENT_ERROR_DATA::random(rng),
35350            )),
35351            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35352                SAFETY_ALLOWED_AREA_DATA::random(rng),
35353            )),
35354            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35355                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35356            )),
35357            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35358            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35359            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35360            SCALED_PRESSURE_DATA::ID => {
35361                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35362            }
35363            SCALED_PRESSURE2_DATA::ID => {
35364                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35365            }
35366            SCALED_PRESSURE3_DATA::ID => {
35367                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35368            }
35369            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35370            SERVO_OUTPUT_RAW_DATA::ID => {
35371                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35372            }
35373            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35374            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35375                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35376            )),
35377            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35378                SET_ATTITUDE_TARGET_DATA::random(rng),
35379            )),
35380            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35381                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35382            )),
35383            SET_HOME_POSITION_DATA::ID => {
35384                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35385            }
35386            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35387            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35388                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35389            )),
35390            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35391                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35392            )),
35393            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35394            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35395                SMART_BATTERY_INFO_DATA::random(rng),
35396            )),
35397            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35398            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35399                STORAGE_INFORMATION_DATA::random(rng),
35400            )),
35401            SUPPORTED_TUNES_DATA::ID => {
35402                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35403            }
35404            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35405            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35406            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35407            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35408            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35409            TERRAIN_REQUEST_DATA::ID => {
35410                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35411            }
35412            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35413            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35414                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35415            )),
35416            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35417                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35418                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35419                ))
35420            }
35421            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35422                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35423                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35424                ))
35425            }
35426            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35427            UAVCAN_NODE_INFO_DATA::ID => {
35428                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35429            }
35430            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35431                UAVCAN_NODE_STATUS_DATA::random(rng),
35432            )),
35433            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35434                UTM_GLOBAL_POSITION_DATA::random(rng),
35435            )),
35436            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35437            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35438            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35439            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35440                VICON_POSITION_ESTIMATE_DATA::random(rng),
35441            )),
35442            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35443                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35444            )),
35445            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35446                VIDEO_STREAM_STATUS_DATA::random(rng),
35447            )),
35448            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35449                VISION_POSITION_ESTIMATE_DATA::random(rng),
35450            )),
35451            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35452                VISION_SPEED_ESTIMATE_DATA::random(rng),
35453            )),
35454            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35455            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35456            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35457            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35458            _ => None,
35459        }
35460    }
35461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35462        match self {
35463            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35464            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35465            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35466            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35467            Self::ALTITUDE(body) => body.ser(version, bytes),
35468            Self::ATTITUDE(body) => body.ser(version, bytes),
35469            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35470            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35471            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35472            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35473            Self::AUTH_KEY(body) => body.ser(version, bytes),
35474            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35475            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35476            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35477            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35478            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35479            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35480            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35481            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35482            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35483            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35484            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35485            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35486            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35487            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35488            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35489            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35490            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35491            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35492            Self::CAN_FRAME(body) => body.ser(version, bytes),
35493            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35494            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35495            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35496            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35497            Self::COLLISION(body) => body.ser(version, bytes),
35498            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35499            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35500            Self::COMMAND_INT(body) => body.ser(version, bytes),
35501            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35502            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35503            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35504            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35505            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35506            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35507            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35508            Self::DATA_STREAM(body) => body.ser(version, bytes),
35509            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35510            Self::DEBUG(body) => body.ser(version, bytes),
35511            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35512            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35513            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35514            Self::EFI_STATUS(body) => body.ser(version, bytes),
35515            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35516            Self::ESC_INFO(body) => body.ser(version, bytes),
35517            Self::ESC_STATUS(body) => body.ser(version, bytes),
35518            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35519            Self::EVENT(body) => body.ser(version, bytes),
35520            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35521            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35522            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35523            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35524            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35525            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35526            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35527            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35528            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
35529            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
35530            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
35531            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
35532            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
35533            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
35534            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
35535            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
35536            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
35537            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35538            Self::GPS2_RAW(body) => body.ser(version, bytes),
35539            Self::GPS2_RTK(body) => body.ser(version, bytes),
35540            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35541            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
35542            Self::GPS_INPUT(body) => body.ser(version, bytes),
35543            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
35544            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
35545            Self::GPS_RTK(body) => body.ser(version, bytes),
35546            Self::GPS_STATUS(body) => body.ser(version, bytes),
35547            Self::HEARTBEAT(body) => body.ser(version, bytes),
35548            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
35549            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
35550            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
35551            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
35552            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
35553            Self::HIL_GPS(body) => body.ser(version, bytes),
35554            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
35555            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
35556            Self::HIL_SENSOR(body) => body.ser(version, bytes),
35557            Self::HIL_STATE(body) => body.ser(version, bytes),
35558            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
35559            Self::HOME_POSITION(body) => body.ser(version, bytes),
35560            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
35561            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
35562            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
35563            Self::LANDING_TARGET(body) => body.ser(version, bytes),
35564            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
35565            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
35566            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
35567            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
35568            Self::LOGGING_ACK(body) => body.ser(version, bytes),
35569            Self::LOGGING_DATA(body) => body.ser(version, bytes),
35570            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
35571            Self::LOG_DATA(body) => body.ser(version, bytes),
35572            Self::LOG_ENTRY(body) => body.ser(version, bytes),
35573            Self::LOG_ERASE(body) => body.ser(version, bytes),
35574            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
35575            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
35576            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
35577            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
35578            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
35579            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
35580            Self::MEMORY_VECT(body) => body.ser(version, bytes),
35581            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
35582            Self::MISSION_ACK(body) => body.ser(version, bytes),
35583            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
35584            Self::MISSION_COUNT(body) => body.ser(version, bytes),
35585            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
35586            Self::MISSION_ITEM(body) => body.ser(version, bytes),
35587            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
35588            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
35589            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
35590            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
35591            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
35592            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
35593            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
35594            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
35595            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
35596            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
35597            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
35598            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
35599            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
35600            Self::ODOMETRY(body) => body.ser(version, bytes),
35601            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
35602            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
35603            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
35604            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
35605            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
35606            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
35607            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
35608            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
35609            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
35610            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
35611            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
35612            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
35613            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
35614            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
35615            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
35616            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
35617            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
35618            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
35619            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
35620            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
35621            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
35622            Self::PARAM_SET(body) => body.ser(version, bytes),
35623            Self::PARAM_VALUE(body) => body.ser(version, bytes),
35624            Self::PING(body) => body.ser(version, bytes),
35625            Self::PLAY_TUNE(body) => body.ser(version, bytes),
35626            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
35627            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35628            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35629            Self::POWER_STATUS(body) => body.ser(version, bytes),
35630            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
35631            Self::RADIO_STATUS(body) => body.ser(version, bytes),
35632            Self::RAW_IMU(body) => body.ser(version, bytes),
35633            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
35634            Self::RAW_RPM(body) => body.ser(version, bytes),
35635            Self::RC_CHANNELS(body) => body.ser(version, bytes),
35636            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
35637            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
35638            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
35639            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
35640            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
35641            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
35642            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
35643            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
35644            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
35645            Self::SCALED_IMU(body) => body.ser(version, bytes),
35646            Self::SCALED_IMU2(body) => body.ser(version, bytes),
35647            Self::SCALED_IMU3(body) => body.ser(version, bytes),
35648            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
35649            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
35650            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
35651            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
35652            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
35653            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
35654            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35655            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
35656            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
35657            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
35658            Self::SET_MODE(body) => body.ser(version, bytes),
35659            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
35660            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
35661            Self::SIM_STATE(body) => body.ser(version, bytes),
35662            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
35663            Self::STATUSTEXT(body) => body.ser(version, bytes),
35664            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
35665            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
35666            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
35667            Self::SYS_STATUS(body) => body.ser(version, bytes),
35668            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
35669            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
35670            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
35671            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
35672            Self::TIMESYNC(body) => body.ser(version, bytes),
35673            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
35674            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
35675            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
35676            Self::TUNNEL(body) => body.ser(version, bytes),
35677            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
35678            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
35679            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
35680            Self::V2_EXTENSION(body) => body.ser(version, bytes),
35681            Self::VFR_HUD(body) => body.ser(version, bytes),
35682            Self::VIBRATION(body) => body.ser(version, bytes),
35683            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35684            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
35685            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
35686            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
35687            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
35688            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
35689            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
35690            Self::WINCH_STATUS(body) => body.ser(version, bytes),
35691            Self::WIND_COV(body) => body.ser(version, bytes),
35692        }
35693    }
35694    fn extra_crc(id: u32) -> u8 {
35695        match id {
35696            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
35697            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
35698            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
35699            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
35700            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
35701            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
35702            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
35703            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
35704            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
35705            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
35706            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
35707            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35708                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
35709            }
35710            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
35711            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
35712            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
35713            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
35714            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
35715            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
35716            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
35717            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
35718            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
35719            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
35720            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
35721            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
35722            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
35723            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
35724            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
35725            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
35726            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
35727            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
35728            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
35729            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
35730            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
35731            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
35732            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
35733            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
35734            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
35735            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
35736            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
35737            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
35738            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
35739            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
35740            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
35741            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
35742            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
35743            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
35744            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
35745            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
35746            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
35747            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
35748            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
35749            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
35750            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
35751            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
35752            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
35753            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
35754            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
35755            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
35756            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
35757            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
35758            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
35759            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
35760            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
35761            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
35762            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
35763            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
35764            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
35765            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
35766            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
35767            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35768                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
35769            }
35770            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
35771            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
35772            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
35773            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
35774            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35775                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
35776            }
35777            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
35778            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
35779            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
35780            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
35781            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
35782            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
35783            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
35784            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
35785            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
35786            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
35787            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
35788            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
35789            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
35790            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
35791            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
35792            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
35793            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
35794            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
35795            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
35796            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
35797            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
35798            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
35799            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
35800            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
35801            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
35802            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
35803            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
35804            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
35805            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
35806            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35807                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
35808            }
35809            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
35810            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
35811            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
35812            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
35813            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
35814            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
35815            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
35816            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
35817            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
35818            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
35819            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
35820            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
35821            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
35822            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
35823            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
35824            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
35825            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
35826            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
35827            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
35828            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
35829            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
35830            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
35831            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
35832            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
35833            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
35834            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
35835            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
35836            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
35837            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
35838            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
35839            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
35840            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
35841            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
35842            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
35843            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
35844            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
35845            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
35846            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
35847            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
35848            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
35849            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
35850            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
35851            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
35852            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
35853            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
35854            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
35855            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
35856            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
35857            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
35858            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
35859            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
35860            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
35861            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
35862            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
35863            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
35864            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
35865            PING_DATA::ID => PING_DATA::EXTRA_CRC,
35866            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
35867            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
35868            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
35869            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35870            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
35871            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
35872            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
35873            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
35874            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
35875            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
35876            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
35877            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
35878            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
35879            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
35880            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
35881            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
35882            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
35883            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
35884            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
35885            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
35886            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
35887            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
35888            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
35889            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
35890            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
35891            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
35892            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
35893            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
35894            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
35895            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
35896            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
35897            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
35898            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
35899            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
35900            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35901                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
35902            }
35903            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35904            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
35905            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
35906            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
35907            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
35908            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
35909            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
35910            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
35911            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
35912            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
35913            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
35914            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
35915            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
35916            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
35917            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35918                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
35919            }
35920            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35921                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
35922            }
35923            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
35924            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
35925            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
35926            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
35927            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
35928            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
35929            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
35930            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35931            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
35932            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
35933            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35934            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
35935            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
35936            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
35937            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
35938            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
35939            _ => 0,
35940        }
35941    }
35942    fn target_system_id(&self) -> Option<u8> {
35943        match self {
35944            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
35945            Self::CANFD_FRAME(inner) => Some(inner.target_system),
35946            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
35947            Self::CAN_FRAME(inner) => Some(inner.target_system),
35948            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
35949            Self::COMMAND_ACK(inner) => Some(inner.target_system),
35950            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
35951            Self::COMMAND_INT(inner) => Some(inner.target_system),
35952            Self::COMMAND_LONG(inner) => Some(inner.target_system),
35953            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
35954            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
35955            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
35956            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
35957            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
35958            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
35959            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
35960            Self::LOGGING_ACK(inner) => Some(inner.target_system),
35961            Self::LOGGING_DATA(inner) => Some(inner.target_system),
35962            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
35963            Self::LOG_ERASE(inner) => Some(inner.target_system),
35964            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
35965            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
35966            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
35967            Self::MISSION_ACK(inner) => Some(inner.target_system),
35968            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
35969            Self::MISSION_COUNT(inner) => Some(inner.target_system),
35970            Self::MISSION_ITEM(inner) => Some(inner.target_system),
35971            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
35972            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
35973            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
35974            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
35975            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
35976            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
35977            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
35978            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
35979            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
35980            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
35981            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
35982            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
35983            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
35984            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
35985            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
35986            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
35987            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
35988            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
35989            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
35990            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
35991            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
35992            Self::PARAM_SET(inner) => Some(inner.target_system),
35993            Self::PING(inner) => Some(inner.target_system),
35994            Self::PLAY_TUNE(inner) => Some(inner.target_system),
35995            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
35996            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
35997            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
35998            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
35999            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36000            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36001            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36002            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36003            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36004            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36005            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36006            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36007            Self::SET_MODE(inner) => Some(inner.target_system),
36008            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36009            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36010            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36011            Self::TIMESYNC(inner) => Some(inner.target_system),
36012            Self::TUNNEL(inner) => Some(inner.target_system),
36013            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36014            _ => None,
36015        }
36016    }
36017    fn target_component_id(&self) -> Option<u8> {
36018        match self {
36019            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36020            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36021            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36022            Self::CAN_FRAME(inner) => Some(inner.target_component),
36023            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36024            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36025            Self::COMMAND_INT(inner) => Some(inner.target_component),
36026            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36027            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36028            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36029            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36030            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36031            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36032            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36033            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36034            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36035            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36036            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36037            Self::LOG_ERASE(inner) => Some(inner.target_component),
36038            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36039            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36040            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36041            Self::MISSION_ACK(inner) => Some(inner.target_component),
36042            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36043            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36044            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36045            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36046            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36047            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36048            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36049            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36050            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36051            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36052            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36053            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36054            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36055            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36056            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36057            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36058            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36059            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36060            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36061            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36062            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36063            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36064            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36065            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36066            Self::PARAM_SET(inner) => Some(inner.target_component),
36067            Self::PING(inner) => Some(inner.target_component),
36068            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36069            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36070            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36071            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36072            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36073            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36074            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36075            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36076            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36077            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36078            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36079            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36080            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36081            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36082            Self::TIMESYNC(inner) => Some(inner.target_component),
36083            Self::TUNNEL(inner) => Some(inner.target_component),
36084            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36085            _ => None,
36086        }
36087    }
36088}